Modern IDB: SQLite backend mismanages key generator values.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jan 2016 06:50:40 +0000 (06:50 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jan 2016 06:50:40 +0000 (06:50 +0000)
commitcd93a55e655189476da4bf1689dd67851b669aa7
tree8650b3bdc04cce3e7d66b92a9fac6a6886fcc884
parentddfd7cc804b0313544e823a4f0c72ffb21a77ab0
Modern IDB: SQLite backend mismanages key generator values.
https://bugs.webkit.org/show_bug.cgi?id=153625

Reviewed by Andy Estes.

Source/WebCore:

No new tests (Many failing tests pass, a few get closer).

There's mixed assumptions about whether the value stored is the current value or the next value.

Fixing those assumptions fixes tests.

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber): Store/retrieve the correct value.
(WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber): Ditto.
(WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber): Ditto.

LayoutTests:

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp