IDBIndex.openCursor() matches indices on multiple object stores.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2016 22:34:02 +0000 (22:34 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2016 22:34:02 +0000 (22:34 +0000)
commit97dc60841746005de07d6167a109c1bf0a822c91
tree5af75e8d3e67d03c575b6010c39fc5cf4e939145
parentb3b0e01457844ddb91aafdeb30a0946c855535f3
IDBIndex.openCursor() matches indices on multiple object stores.
<rdar://problem/28434463> and https://bugs.webkit.org/show_bug.cgi?id=158833

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-private.html
       storage/indexeddb/modern/multiple-objectstore-index-cursor-collision.html

* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::buildIndexStatement): Need to include the object store id in the statement for
  index cursors, otherwise there will be collisions amongst multiple object stores that happen to
  share primary keys.
(WebCore::IDBServer::SQLiteIDBCursor::bindArguments):

LayoutTests:

* storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-expected.txt: Added.
* storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-private-expected.txt: Added.
* storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-private.html: Added.
* storage/indexeddb/modern/multiple-objectstore-index-cursor-collision.html: Added.
* storage/indexeddb/modern/resources/multiple-objectstore-index-cursor-collision.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/multiple-objectstore-index-cursor-collision-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/multiple-objectstore-index-cursor-collision.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/resources/multiple-objectstore-index-cursor-collision.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp