aboutsummaryrefslogtreecommitdiff
path: root/src/update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/update.c b/src/update.c
index 6eb92fb61..12348c91a 100644
--- a/src/update.c
+++ b/src/update.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle UPDATE statements.
**
-** $Id: update.c,v 1.202 2009/05/28 01:00:55 drh Exp $
+** $Id: update.c,v 1.203 2009/06/23 20:28:54 drh Exp $
*/
#include "sqliteInt.h"
@@ -564,6 +564,14 @@ void sqlite3Update(
sqlite3VdbeAddOp2(v, OP_Close, oldIdx, 0);
}
+ /* 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 changed. If this routine is
** generating code because of a call to sqlite3NestedParse(), do not