/ 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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1a8aedc3376b7ae32fa7b2c367eedd483e2629908836efd10ee5bd1fe0784675
User & Date: dan 2018-09-07 11:51:21
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
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/alter.c.

  1413   1413   
  1414   1414             sqlite3SelectPrep(&sParse, pTab->pSelect, &sNC);
  1415   1415             if( sParse.nErr ) rc = sParse.rc;
  1416   1416             sqlite3WalkSelect(&sWalker, pTab->pSelect);
  1417   1417           }else{
  1418   1418             /* Modify any FK definitions to point to the new table. */
  1419   1419   #ifndef SQLITE_OMIT_FOREIGN_KEY
  1420         -          FKey *pFKey;
  1421         -          for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
  1422         -            if( sqlite3_stricmp(pFKey->zTo, zOld)==0 ){
  1423         -              renameTokenFind(&sParse, &sCtx, (void*)pFKey->zTo);
         1420  +          if( db->flags & SQLITE_ForeignKeys ){
         1421  +            FKey *pFKey;
         1422  +            for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
         1423  +              if( sqlite3_stricmp(pFKey->zTo, zOld)==0 ){
         1424  +                renameTokenFind(&sParse, &sCtx, (void*)pFKey->zTo);
         1425  +              }
  1424   1426               }
  1425   1427             }
  1426   1428   #endif
  1427   1429   
  1428   1430             /* If this is the table being altered, fix any table refs in CHECK
  1429   1431             ** expressions. Also update the name that appears right after the
  1430   1432             ** "CREATE [VIRTUAL] TABLE" bit. */

Changes to test/mmap1.test.

   280    280   # The "6.*" tests are designed to test the interaction of mmap with file
   281    281   # truncation (e.g. on Win32) via the VACUUM command.
   282    282   #
   283    283   forcedelete test2.db
   284    284   sqlite3 db2 test2.db
   285    285   do_test 6.0 {
   286    286     db2 eval {
          287  +    PRAGMA auto_vacuum = 0;
   287    288       PRAGMA page_size = 4096;
   288    289     }
   289    290   } {}
   290    291   do_test 6.1 {
   291    292     db2 eval {
   292    293       CREATE TABLE t1(x);
   293    294       INSERT INTO t1(x) VALUES(randomblob(1000000));

Changes to test/resetdb.test.

   209    209   
   210    210   #-------------------------------------------------------------------------
   211    211   db2 close
   212    212   reset_db
   213    213   
   214    214   do_execsql_test 700 {
   215    215     PRAGMA page_size=512;
          216  +  PRAGMA auto_vacuum = 0;
   216    217     CREATE TABLE t1(a,b,c);
   217    218     CREATE INDEX t1a ON t1(a);
   218    219     CREATE INDEX t1bc ON t1(b,c);
   219    220     WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<10)
   220    221       INSERT INTO t1(a,b,c) SELECT x, randomblob(100),randomblob(100) FROM c;
   221    222     PRAGMA page_count;
   222    223     PRAGMA integrity_check;