Changeset 175378 in webkit for trunk/Source/WebKit2/ChangeLog


Ignore:
Timestamp:
Oct 30, 2014 2:00:58 PM (9 years ago)
Author:
beidson@apple.com
Message:

IndexedDB is deleting data when a PK is shared amongst two objectStores
rdar://problem/18479306 and https://bugs.webkit.org/show_bug.cgi?id=137154

Reviewed by Jer Noble.

Source/WebKit2:

  • DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:

(WebKit::v1RecordsTableSchema): Store away the v1 schema for introspection into the database.
(WebKit::v2RecordsTableSchema): Add utility methods to get the v2 schema with different Table names.
(WebKit::createOrMigrateRecordsTableIfNecessary): Check to see if the Records table exists with

the correct schema. If it is the v1 schema, then migrate the data to a new v2 table, drop the v1
table, then slide the new table into place.

(WebKit::UniqueIDBDatabaseBackingStoreSQLite::ensureValidRecordsTable): Make sure the Records table

exists and is v2, and then make sure the uniqueness index exists.

(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Don’t bother creating

the Records table here as it will have already been established earlier.

(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):

  • DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

LayoutTests:

  • storage/indexeddb/primary-key-unique-to-objectstore-expected.txt: Added.
  • storage/indexeddb/primary-key-unique-to-objectstore.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r175376 r175378  
     12014-10-30  Brady Eidson  <beidson@apple.com>
     2
     3        IndexedDB is deleting data when a PK is shared amongst two objectStores
     4        rdar://problem/18479306 and https://bugs.webkit.org/show_bug.cgi?id=137154
     5
     6        Reviewed by Jer Noble.
     7
     8        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
     9        (WebKit::v1RecordsTableSchema): Store away the v1 schema for introspection into the database.
     10        (WebKit::v2RecordsTableSchema): Add utility methods to get the v2 schema with different Table names.
     11        (WebKit::createOrMigrateRecordsTableIfNecessary): Check to see if the Records table exists with
     12          the correct schema. If it is the v1 schema, then migrate the data to a new v2 table, drop the v1
     13          table, then slide the new table into place.
     14        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::ensureValidRecordsTable): Make sure the Records table
     15          exists and is v2, and then make sure the uniqueness index exists.
     16        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Don’t bother creating
     17          the Records table here as it will have already been established earlier.
     18        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
     19        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
     20
    1212014-10-30  Beth Dakin  <bdakin@apple.com>
    222
Note: See TracChangeset for help on using the changeset viewer.