mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Correctly handle changing counting when inserting and deleting on
WITHOUT ROWID tables. Add more FOREIGN KEY test cases. FossilOrigin-Name: d072bcd0a8692d590c13c2bf458454c10c12a3e2
This commit is contained in:
@@ -1627,9 +1627,12 @@ void sqlite3CompleteInsertion(
|
||||
sqlite3VdbeAddOp2(v, OP_IsNull, aRegIdx[i], sqlite3VdbeCurrentAddr(v)+2);
|
||||
}
|
||||
sqlite3VdbeAddOp2(v, OP_IdxInsert, iIdxCur+i, aRegIdx[i]);
|
||||
if( useSeekResult ){
|
||||
sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
|
||||
pik_flags = 0;
|
||||
if( useSeekResult ) pik_flags = OPFLAG_USESEEKRESULT;
|
||||
if( pIdx->autoIndex==2 && !HasRowid(pTab) && pParse->nested==0 ){
|
||||
pik_flags |= OPFLAG_NCHANGE;
|
||||
}
|
||||
if( pik_flags ) sqlite3VdbeChangeP5(v, pik_flags);
|
||||
}
|
||||
if( !HasRowid(pTab) ) return;
|
||||
regData = regNewData + 1;
|
||||
|
||||
Reference in New Issue
Block a user