SQLite

Check-in [1a8aedc337]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor fixes for problems revealed by releasetest.tcl.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1a8aedc3376b7ae32fa7b2c367eedd483e2629908836efd10ee5bd1fe0784675
User & Date: dan 2018-09-07 11:51:21.104
Context
2018-09-07
15:50
Fix a problem with renaming a non-temp table that has at least one temp trigger and shares its name with a temp table. (check-in: ceb60bd7e5 user: dan tags: trunk)
11:51
Minor fixes for problems revealed by releasetest.tcl. (check-in: 1a8aedc337 user: dan tags: trunk)
11:08
Fix an uninitialized variable in the OP_ParseSchema opcode that comes up only if the schema is corrupt. (check-in: 725808d4c5 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/alter.c.
1413
1414
1415
1416
1417
1418
1419

1420
1421
1422
1423





1424
1425
1426
1427
1428
1429
1430
1413
1414
1415
1416
1417
1418
1419
1420




1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432







+
-
-
-
-
+
+
+
+
+








          sqlite3SelectPrep(&sParse, pTab->pSelect, &sNC);
          if( sParse.nErr ) rc = sParse.rc;
          sqlite3WalkSelect(&sWalker, pTab->pSelect);
        }else{
          /* Modify any FK definitions to point to the new table. */
#ifndef SQLITE_OMIT_FOREIGN_KEY
          if( db->flags & SQLITE_ForeignKeys ){
          FKey *pFKey;
          for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
            if( sqlite3_stricmp(pFKey->zTo, zOld)==0 ){
              renameTokenFind(&sParse, &sCtx, (void*)pFKey->zTo);
            FKey *pFKey;
            for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
              if( sqlite3_stricmp(pFKey->zTo, zOld)==0 ){
                renameTokenFind(&sParse, &sCtx, (void*)pFKey->zTo);
              }
            }
          }
#endif

          /* If this is the table being altered, fix any table refs in CHECK
          ** expressions. Also update the name that appears right after the
          ** "CREATE [VIRTUAL] TABLE" bit. */
Changes to test/mmap1.test.
280
281
282
283
284
285
286

287
288
289
290
291
292
293
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294







+







# The "6.*" tests are designed to test the interaction of mmap with file
# truncation (e.g. on Win32) via the VACUUM command.
#
forcedelete test2.db
sqlite3 db2 test2.db
do_test 6.0 {
  db2 eval {
    PRAGMA auto_vacuum = 0;
    PRAGMA page_size = 4096;
  }
} {}
do_test 6.1 {
  db2 eval {
    CREATE TABLE t1(x);
    INSERT INTO t1(x) VALUES(randomblob(1000000));
Changes to test/resetdb.test.
209
210
211
212
213
214
215

216
217
218
219
220
221
222
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223







+








#-------------------------------------------------------------------------
db2 close
reset_db

do_execsql_test 700 {
  PRAGMA page_size=512;
  PRAGMA auto_vacuum = 0;
  CREATE TABLE t1(a,b,c);
  CREATE INDEX t1a ON t1(a);
  CREATE INDEX t1bc ON t1(b,c);
  WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<10)
    INSERT INTO t1(a,b,c) SELECT x, randomblob(100),randomblob(100) FROM c;
  PRAGMA page_count;
  PRAGMA integrity_check;