mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-06 15:49:35 +03:00
Enhance autoincrement so that it works with triggers that also do
autoincrement inserts, even multiple inserts into the same table. Ticket #3928 (CVS 6807) FossilOrigin-Name: 1330993de8eae7baeec24100216158063c9bdc19
This commit is contained in:
10
src/delete.c
10
src/delete.c
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** in order to generate code for DELETE FROM statements.
|
||||
**
|
||||
** $Id: delete.c,v 1.203 2009/05/28 01:00:55 drh Exp $
|
||||
** $Id: delete.c,v 1.204 2009/06/23 20:28:54 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -475,6 +475,14 @@ void sqlite3DeleteFrom(
|
||||
}
|
||||
}
|
||||
|
||||
/* Update the sqlite_sequence table by storing the content of the
|
||||
** maximum rowid counter values recorded while inserting into
|
||||
** autoincrement tables.
|
||||
*/
|
||||
if( pParse->nested==0 && pParse->trigStack==0 ){
|
||||
sqlite3AutoincrementEnd(pParse);
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the number of rows that were deleted. If this routine is
|
||||
** generating code because of a call to sqlite3NestedParse(), do not
|
||||
|
||||
Reference in New Issue
Block a user