2020-01-07 12:46:52 +00:00
|
|
|
diff -up firefox-72.0/dom/indexedDB/ActorsParent.cpp.mozilla-1601707 firefox-72.0/dom/indexedDB/ActorsParent.cpp
|
|
|
|
--- firefox-72.0/dom/indexedDB/ActorsParent.cpp.mozilla-1601707 2020-01-03 19:57:54.000000000 +0100
|
|
|
|
+++ firefox-72.0/dom/indexedDB/ActorsParent.cpp 2020-01-07 13:33:31.950688264 +0100
|
|
|
|
@@ -24617,11 +24617,11 @@ nsresult ObjectStoreAddOrPutRequestOp::D
|
2019-12-06 10:20:58 +00:00
|
|
|
// if we allow overwrite or not. By not allowing overwrite we raise
|
|
|
|
// detectable errors rather than corrupting data.
|
|
|
|
DatabaseConnection::CachedStatement stmt;
|
|
|
|
- const auto& optReplaceDirective = (!mOverwrite || keyUnset)
|
|
|
|
- ? NS_LITERAL_CSTRING("")
|
|
|
|
- : NS_LITERAL_CSTRING("OR REPLACE ");
|
|
|
|
rv = aConnection->GetCachedStatement(
|
|
|
|
- NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective +
|
|
|
|
+ NS_LITERAL_CSTRING("INSERT ") +
|
|
|
|
+ ((!mOverwrite || keyUnset)
|
|
|
|
+ ? NS_LITERAL_CSTRING("")
|
|
|
|
+ : NS_LITERAL_CSTRING("OR REPLACE ")) +
|
|
|
|
NS_LITERAL_CSTRING("INTO object_data "
|
|
|
|
"(object_store_id, key, file_ids, data) "
|
|
|
|
"VALUES (:") +
|
2020-01-07 12:46:52 +00:00
|
|
|
@@ -26457,10 +26457,6 @@ nsresult Cursor::OpenOp::DoIndexDatabase
|
2019-12-06 10:20:58 +00:00
|
|
|
|
|
|
|
const bool usingKeyRange = mOptionalKeyRange.isSome();
|
|
|
|
|
|
|
|
- const auto& indexTable = mCursor->mUniqueIndex
|
|
|
|
- ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
- : NS_LITERAL_CSTRING("index_data");
|
2020-01-07 12:46:52 +00:00
|
|
|
-
|
|
|
|
// The result of MakeColumnPairSelectionList is stored in a local variable,
|
|
|
|
// since inlining it into the next statement causes a crash on some Mac OS X
|
|
|
|
// builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
|
|
|
|
@@ -26478,7 +26474,9 @@ nsresult Cursor::OpenOp::DoIndexDatabase
|
2019-12-06 10:20:58 +00:00
|
|
|
"object_data.file_ids, "
|
|
|
|
"object_data.data "
|
|
|
|
"FROM ") +
|
|
|
|
- indexTable +
|
|
|
|
+ (mCursor->mUniqueIndex
|
|
|
|
+ ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
+ : NS_LITERAL_CSTRING("index_data")) +
|
|
|
|
NS_LITERAL_CSTRING(
|
|
|
|
" AS index_table "
|
|
|
|
"JOIN object_data "
|
2020-01-07 12:46:52 +00:00
|
|
|
@@ -26563,10 +26561,6 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
|
2019-12-06 10:20:58 +00:00
|
|
|
|
|
|
|
const bool usingKeyRange = mOptionalKeyRange.isSome();
|
|
|
|
|
|
|
|
- const auto& table = mCursor->mUniqueIndex
|
|
|
|
- ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
- : NS_LITERAL_CSTRING("index_data");
|
2020-01-07 12:46:52 +00:00
|
|
|
-
|
|
|
|
// The result of MakeColumnPairSelectionList is stored in a local variable,
|
|
|
|
// since inlining it into the next statement causes a crash on some Mac OS X
|
|
|
|
// builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
|
|
|
|
@@ -26581,7 +26575,10 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
|
2019-12-06 10:20:58 +00:00
|
|
|
NS_LITERAL_CSTRING(
|
|
|
|
"object_data_key "
|
|
|
|
" FROM ") +
|
|
|
|
- table + NS_LITERAL_CSTRING(" WHERE index_id = :") +
|
|
|
|
+ (mCursor->mUniqueIndex
|
|
|
|
+ ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
+ : NS_LITERAL_CSTRING("index_data")) +
|
|
|
|
+ NS_LITERAL_CSTRING(" WHERE index_id = :") +
|
|
|
|
kStmtParamNameId;
|
|
|
|
|
2020-01-07 12:46:52 +00:00
|
|
|
const auto keyRangeClause = MaybeGetBindingClauseForKeyRange(
|