ASSIGNED 145993
IDB: Records table migration doesn't work with all versions of SQLite
https://bugs.webkit.org/show_bug.cgi?id=145993
Summary IDB: Records table migration doesn't work with all versions of SQLite
Brady Eidson
Reported 2015-06-15 16:45:38 PDT
IDB: Records table migration doesn't work with all versions of SQLite Getting the current Records table schema from the sqlite_master table does not necessarily return the exact SQL used to create the table. Some SQLites will return a quoted table name in the returned SQL, and others will have the table name be unquoted. In the createOrMigrateRecordsTableIfNecessary() function we should check for both the quoted and unquoted schemas.
Attachments
Patch v1 (3.99 KB, patch)
2015-06-15 16:52 PDT, Brady Eidson
darin: review+
Patch for landing (4.55 KB, patch)
2015-06-16 10:45 PDT, Brady Eidson
beidson: commit-queue-
Patch for landing v2 (4.55 KB, patch)
2015-06-16 10:51 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2015-06-15 16:52:06 PDT
Created attachment 254907 [details] Patch v1
Jon Lee
Comment 2 2015-06-15 17:19:02 PDT
Comment on attachment 254907 [details] Patch v1 Provisional r=me
Jon Lee
Comment 3 2015-06-15 17:20:51 PDT
CC'ing some folks who might be able to give a real r+.
Darin Adler
Comment 4 2015-06-16 09:39:40 PDT
Comment on attachment 254907 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=254907&action=review > Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:63 > + StringBuilder builder; > + builder.appendLiteral("CREATE TABLE "); > + builder.append(tableName); > + builder.appendLiteral(" (objectStoreID INTEGER NOT NULL ON CONFLICT FAIL, key TEXT COLLATE IDBKEY NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE, value NOT NULL ON CONFLICT FAIL)"); > + return builder.toString(); This is something that would be more efficient with just the "+" operator or makeString rather than a StringBuilder.
Brady Eidson
Comment 5 2015-06-16 10:45:38 PDT
Created attachment 254957 [details] Patch for landing
WebKit Commit Bot
Comment 6 2015-06-16 10:49:03 PDT
Comment on attachment 254957 [details] Patch for landing Rejecting attachment 254957 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 254957, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit /Volumes/Data/EWS/WebKit/Source/WebKit2/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://webkit-queues.appspot.com/results/6073680211738624
Brady Eidson
Comment 7 2015-06-16 10:50:43 PDT
(In reply to comment #6) > Comment on attachment 254957 [details] > Patch for landing > > Rejecting attachment 254957 [details] from commit-queue. > > Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', > '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', > 'validate-changelog', '--check-oops', '--non-interactive', 254957, > '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit > > /Volumes/Data/EWS/WebKit/Source/WebKit2/ChangeLog neither lists a valid > reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case > insensitive). > Wrong. Thanks, tools.
Brady Eidson
Comment 8 2015-06-16 10:51:52 PDT
Created attachment 254958 [details] Patch for landing v2
Brady Eidson
Comment 9 2015-06-16 11:27:41 PDT
WebKit Commit Bot
Comment 10 2015-06-16 11:42:01 PDT
Comment on attachment 254958 [details] Patch for landing v2 Clearing flags on attachment: 254958 Committed r185599: <http://trac.webkit.org/changeset/185599>
Note You need to log in before you can comment on or make changes to this bug.