1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Make sure sufficient space is allocated for at least one VDBE cursor when

autoincrement is used.  Ticket [a696379c1f088].

FossilOrigin-Name: 2b2a1ef74e24857b8d18f6370894588fc2aa5ebb
This commit is contained in:
drh
2009-09-14 23:47:24 +00:00
parent 323eb20464
commit 3492dd71dd
4 changed files with 39 additions and 11 deletions

View File

@@ -196,6 +196,9 @@ void sqlite3FinishCoding(Parse *pParse){
sqlite3VdbeTrace(v, trace);
#endif
assert( pParse->iCacheLevel==0 ); /* Disables and re-enables match */
/* A minimum of one cursor is required if autoincrement is used
* See ticket [a696379c1f08866] */
if( pParse->pAinc!=0 && pParse->nTab==0 ) pParse->nTab = 1;
sqlite3VdbeMakeReady(v, pParse->nVar, pParse->nMem,
pParse->nTab, pParse->nMaxArg, pParse->explain,
pParse->isMultiWrite && pParse->mayAbort);