bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

android.database.sqlite.SQLiteException: table history has 10 columns but 9 values were supplied: , while compiling: INSERT INTO history SELECT * FROM history_tmp at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)

RESOLVED FIXED in Firefox 19

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Scoobidiver (away), Assigned: bnicholson)

Tracking

({crash, regression})

19 Branch
Firefox 20
ARM
Android
crash, regression
Points:
---

Firefox Tracking Flags

(firefox19 fixed)

Details

(Whiteboard: [native-crash][startupcrash], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
It has been hit by two users in builds from November 14th, 19th and 20th. Here is a crash report: bp-6d0e6168-3ef8-4abb-b7d9-a681f2121120.

android.database.sqlite.SQLiteException: table history has 10 columns but 9 values were supplied: , while compiling: INSERT INTO history SELECT * FROM history_tmp
	at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
	at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:68)
	at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)
	at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
	at android.database.sqlite.SQLiteStatement.acquireAndLock(SQLiteStatement.java:260)
	at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:84)
	at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:2006)
	at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1946)
	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.migrateHistoryTable(BrowserProvider.java:1191)
	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.upgradeDatabaseFrom6to7(BrowserProvider.java:1275)
	at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.onUpgrade(BrowserProvider.java:1497)
	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:170)
	at org.mozilla.gecko.db.DBUtils.ensureDatabaseIsNotLocked(DBUtils.java:76)
	at org.mozilla.fennec.db.BrowserProvider.getDatabaseHelperForProfile(BrowserProvider.java:1626)
	at org.mozilla.fennec.db.BrowserProvider.getReadableDatabase(BrowserProvider.java:1665)
	at org.mozilla.fennec.db.BrowserProvider.query(BrowserProvider.java:2263)
	at android.content.ContentProvider$Transport.query(ContentProvider.java:189)
	at android.content.ContentResolver.query(ContentResolver.java:315)
	at org.mozilla.gecko.db.LocalBrowserDB.filterAllSites(LocalBrowserDB.java:174)
	at org.mozilla.gecko.db.LocalBrowserDB.getTopSites(LocalBrowserDB.java:227)
	at org.mozilla.gecko.db.BrowserDB.getTopSites(BrowserDB.java:118)
	at org.mozilla.gecko.AboutHomeContent.loadTopSites(AboutHomeContent.java:261)
	at org.mozilla.gecko.AboutHomeContent.access$600(AboutHomeContent.java:71)
	at org.mozilla.gecko.AboutHomeContent$9.run(AboutHomeContent.java:396)
	at android.os.Handler.handleCallback(Handler.java:605)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:154)
	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=android.database.sqlite.SQLiteException%3A+table+history+has+10+columns+but+9+values+were+supplied%3A+%2C+while+compiling%3A+INSERT+INTO+history+SELECT+*+FROM+history_tmp+at+android.database.sqlite.SQLiteCompiledSql.native_compile%28Native+Method%29
(Assignee)

Comment 1

6 years ago
Created attachment 683660 [details] [diff] [review]
Use separate upgrade method for new bookmarks and history tables

I wanted to avoid all the extra code just to add a new favicon column, but since we do an INSERT INTO...SELECT * without explicitly naming columns, that makes things a bit more difficult. This seemed like the easiest fix (the alternative would be explicitly name all columns in the upgrade).
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
Attachment #683660 - Flags: review?(lucasr.at.mozilla)
(Assignee)

Updated

6 years ago
Blocks: 784086
(Reporter)

Updated

6 years ago
Keywords: regression
Version: Trunk → Firefox 19
Comment on attachment 683660 [details] [diff] [review]
Use separate upgrade method for new bookmarks and history tables

Review of attachment 683660 [details] [diff] [review]:
-----------------------------------------------------------------

Looks right to me.
Attachment #683660 - Flags: review?(lucasr.at.mozilla) → review+
(Assignee)

Comment 4

6 years ago
Comment on attachment 683660 [details] [diff] [review]
Use separate upgrade method for new bookmarks and history tables

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 784086
User impact if declined: crashes
Testing completed (on m-c, etc.): just landed m-i
Risk to taking this patch (and alternatives if risky): low
String or UUID changes made by this patch: none
Attachment #683660 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/e59bd66199ef
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
(Reporter)

Updated

6 years ago
status-firefox20: affected → ---

Comment 6

6 years ago
Comment on attachment 683660 [details] [diff] [review]
Use separate upgrade method for new bookmarks and history tables

New FF19 regression, looks good to fix while we're still on Aurora.
Attachment #683660 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.