1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-19 21:43:15 +03:00

Make sure a unique cursor number is allocated for automatic indices.

FossilOrigin-Name: 433d1aecd399590b767ebf07b32023fb718a6574
This commit is contained in:
drh
2013-05-31 20:00:58 +00:00
parent 0edc94dcc7
commit a1f4124cf8
3 changed files with 8 additions and 7 deletions

View File

@@ -1925,6 +1925,7 @@ static void constructAutomaticIndex(
/* Create the automatic index */
pKeyinfo = sqlite3IndexKeyinfo(pParse, pIdx);
assert( pLevel->iIdxCur>=0 );
pLevel->iIdxCur = pParse->nTab++;
sqlite3VdbeAddOp4(v, OP_OpenAutoindex, pLevel->iIdxCur, nColumn+1, 0,
(char*)pKeyinfo, P4_KEYINFO_HANDOFF);
VdbeComment((v, "for %s", pTable->zName));