mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
During DELETE, if an index entry is missing, do not raise the
SQLITE_CORRUPT_INDEX error (added by [f339f31f9e9a856b]) if in "PRAGMA writable_schema=ON" mode. FossilOrigin-Name: 19e56291a7344c7aa69e2845f11cb865ee10a6b89a00bbe74b3babbeebe0357b
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Do\snot\sapply\sthe\spush-down\soptimization\sto\sCTE\ssubqueries\sthat\swill\sbe\nreused\sin\sother\scontexts\sin\swhere\sthe\ssame\soptimization\sis\sunlikely\sto\nbe\svalid.\s\sFix\sfor\sthe\sbug\sreported\sby\n[forum:/forumpost/d496c3d29bc93736|forum\spost\sd496c3d29bc93736].
|
||||
D 2021-08-11T13:48:56.615
|
||||
C During\sDELETE,\sif\san\sindex\sentry\sis\smissing,\sdo\snot\sraise\sthe\nSQLITE_CORRUPT_INDEX\serror\s(added\sby\s[f339f31f9e9a856b])\sif\sin\n"PRAGMA\swritable_schema=ON"\smode.
|
||||
D 2021-08-11T18:43:54.254
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -616,7 +616,7 @@ F src/upsert.c 8789047a8f0a601ea42fa0256d1ba3190c13746b6ba940fe2d25643a7e991937
|
||||
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
|
||||
F src/util.c e9fd5c474691a7c913dfc971f01cf6d3a3d5954db04e0764a6426f845505e692
|
||||
F src/vacuum.c 454973a59fb20bb982efc2df568a098616db6328a0491b6e84e2e07f7333db45
|
||||
F src/vdbe.c b73a5ec9940185eb001ff8cff2cfd429bb438c7e89f2885e0bfdb56c3ff13386
|
||||
F src/vdbe.c e5cdac52d7163c032ae3c54f1cff9391acd23ba79cea0d5a9524c00cc0a856e8
|
||||
F src/vdbe.h 25dabb25c7e157b84e59260cfb5b466c3ac103ede9f36f4db371332c47601abe
|
||||
F src/vdbeInt.h 38206c8dd6b60ff03d9fd4f626b1b4fd0eef7cdc44f2fc2c1973b0f932a3f26b
|
||||
F src/vdbeapi.c aa5aaf2c37676b83af5724c6cd8207a3064ed46a217fd180957f75ac84f7a2a5
|
||||
@@ -1920,7 +1920,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P b1926cc0ab2b81c7df30c4baa6014efcfddb9631f6e46a55c1cec0113ee1afdc
|
||||
R ce3e16b5ef20fdbd2e2ef5054d8e9088
|
||||
P a7ce29a6ef2e0362bbc9b23719d936dce07209b2651153c774682f599bbd888e
|
||||
R 43c6201fd4576d5a109613a7fb8568cd
|
||||
U drh
|
||||
Z 7a699911270175239ae2f5d37d476399
|
||||
Z c3a9195ab1a5e06373a1e61b14ff61dd
|
||||
|
@@ -1 +1 @@
|
||||
a7ce29a6ef2e0362bbc9b23719d936dce07209b2651153c774682f599bbd888e
|
||||
19e56291a7344c7aa69e2845f11cb865ee10a6b89a00bbe74b3babbeebe0357b
|
@@ -5920,7 +5920,8 @@ case OP_SorterInsert: { /* in2 */
|
||||
** an UPDATE or DELETE statement and the index entry to be updated
|
||||
** or deleted is not found. For some uses of IdxDelete
|
||||
** (example: the EXCEPT operator) it does not matter that no matching
|
||||
** entry is found. For those cases, P5 is zero.
|
||||
** entry is found. For those cases, P5 is zero. Also, do not raise
|
||||
** this (self-correcting and non-critical) error if in writable_schema mode.
|
||||
*/
|
||||
case OP_IdxDelete: {
|
||||
VdbeCursor *pC;
|
||||
@@ -5946,7 +5947,7 @@ case OP_IdxDelete: {
|
||||
if( res==0 ){
|
||||
rc = sqlite3BtreeDelete(pCrsr, BTREE_AUXDELETE);
|
||||
if( rc ) goto abort_due_to_error;
|
||||
}else if( pOp->p5 ){
|
||||
}else if( pOp->p5 && !sqlite3WritableSchema(db) ){
|
||||
rc = sqlite3ReportError(SQLITE_CORRUPT_INDEX, __LINE__, "index corruption");
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user