-C Fix\sdocumentation\stypo.\s\sTicket\s\s#1282.\s(CVS\s2512)
-D 2005-06-13T00:48:00
+C Do\snot\srecord\sexistance\sthe\ssqlite_sequence\stable\suntil\sit\sis\sactually\ncreated.\s\sTicket\s#1283.\s(CVS\s2513)
+D 2005-06-14T02:12:46
F Makefile.in 8129e7f261d405db783676f9ca31e0841768c652
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/auth.c 18c5a0befe20f3a58a41e3ddd78f372faeeefe1f
F src/btree.c d2e09ebf755bfd665727133361b22c6a915b12d7
F src/btree.h 41a71ce027db9ddee72cb43df2316bbe3a1d92af
-F src/build.c 593d8fda0576a72e6f1fbf8f1a61db110dde9264
+F src/build.c b6db069ef2e1e1b21460857f498d45a9c0080fe8
F src/callback.c 0910b611e0c158f107ee3ff86f8a371654971e2b
F src/date.c 2134ef4388256e8247405178df8a61bd60dc180a
F src/delete.c 4b68127f55971c7fb459146e0b6cf3bd70cfffe9
F test/attach2.test 3396c012a39ddf7ba6b528d80bd79554168aa115
F test/attach3.test 63013383adc4380af69779f34f4af19bd49f7cbe
F test/auth.test 5129bfe268133092ad2928b8644ef97fa4602b2e
-F test/autoinc.test bef47b3c1c1093599905d1d9c79140f265896db0
+F test/autoinc.test 2aba7dc87438d221e2f2ea0e3e7d5fb6812edf6d
F test/autovacuum.test cf2719b17659f7a011202ad05905654cedf26023
F test/autovacuum_crash.test 05a63b8805b20cfba7ace82856ce4ccdda075a31
F test/autovacuum_ioerr.test 9cf27275ca47b72e188a47c53b61b6d583a01d24
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
-P 0e190e9d9137e9d29fc53ce6f1136047d578bb55
-R 69a15ae8b132956d878be49b79f37737
+P ce6b62fa46bc67085801c48d6a28944d4d373ba9
+R 9d8a9caa3f6f6c80defde0cdf07c4d4f
U drh
-Z 92f8243036f5a7ffb94f41f03ecbe221
+Z 314129c4c40699681e64c32b930006f5
** COMMIT
** ROLLBACK
**
-** $Id: build.c,v 1.326 2005/06/12 21:35:52 drh Exp $
+** $Id: build.c,v 1.327 2005/06/14 02:12:46 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
** so that INSERT can find the table easily.
*/
#ifndef SQLITE_OMIT_AUTOINCREMENT
- if( strcmp(zName, "sqlite_sequence")==0 ){
+ if( !pParse->nested && strcmp(zName, "sqlite_sequence")==0 ){
db->aDb[iDb].pSeqTab = pTable;
}
#endif
# This file implements regression tests for SQLite library. The
# focus of this script is testing the AUTOINCREMENT features.
#
-# $Id: autoinc.test,v 1.5 2005/03/29 03:11:00 danielk1977 Exp $
+# $Id: autoinc.test,v 1.6 2005/06/14 02:12:46 drh Exp $
#
set testdir [file dirname $argv0]
}
} {1 {AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY}}
-catch {db2 close}
+
+# Ticket #1283. Make sure that preparing but never running a statement
+# that creates the sqlite_sequence table does not mess up the database.
+#
+do_test autoinc-8.1 {
+ catch {db2 close}
+ catch {db close}
+ file delete -force test.db
+ set DB [sqlite3 db test.db]
+ set STMT [sqlite3_prepare $DB {
+ CREATE TABLE t1(
+ x INTEGER PRIMARY KEY AUTOINCREMENT
+ )
+ } -1 TAIL]
+ sqlite3_finalize $STMT
+ set STMT [sqlite3_prepare $DB {
+ CREATE TABLE t1(
+ x INTEGER PRIMARY KEY AUTOINCREMENT
+ )
+ } -1 TAIL]
+ sqlite3_step $STMT
+ sqlite3_finalize $STMT
+ execsql {
+ INSERT INTO t1 VALUES(NULL);
+ SELECT * FROM t1;
+ }
+} {1}
+
finish_test