1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Delete PRIMARY KEY index entries last. Only construct the unique prefix of

an index key when deleting entries from an index.

FossilOrigin-Name: 0e56ba69f0fcd12a5166c32f6e4eacdcc29fba04
This commit is contained in:
drh
2013-10-24 14:16:10 +00:00
parent acbbc5ba36
commit 9eade087da
6 changed files with 46 additions and 29 deletions

View File

@@ -1869,7 +1869,7 @@ void sqlite3Pragma(
{ OP_IfPos, 1, 0, 0}, /* 9 */
{ OP_Halt, 0, 0, 0},
};
r1 = sqlite3GenerateIndexKey(pParse, pIdx, 1, 3, 0, &jmp3);
r1 = sqlite3GenerateIndexKey(pParse, pIdx, 1, 0, 0, &jmp3);
sqlite3VdbeAddOp2(v, OP_AddImm, 7+j, 1); /* increment entry count */
jmp2 = sqlite3VdbeAddOp4Int(v, OP_Found, j+2, 0, r1, pIdx->nKeyCol+1);
addr = sqlite3VdbeAddOpList(v, ArraySize(idxErr), idxErr);