/ Check-in [158a2d16]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:All tests pass when SQLITE_OMIT_INTEGRITY_CHECK is defined. (CVS 2055)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 158a2d16a8630e3b5892120f6ea68f2b0dc47eb3
User & Date: drh 2004-11-04 14:47:12
Context
2004-11-05
00:43
Incremental check-in of changes that will ultimately lead to a working autoincrement. (CVS 2056) check-in: 10c3d883 user: drh tags: trunk
2004-11-04
14:47
All tests pass when SQLITE_OMIT_INTEGRITY_CHECK is defined. (CVS 2055) check-in: 158a2d16 user: drh tags: trunk
14:30
Support root-page allocation/deallocation in auto-vacuum databases. Still a few problems. (CVS 2054) check-in: 1da361fa user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

    19     19   **     DROP INDEX
    20     20   **     creating ID lists
    21     21   **     BEGIN TRANSACTION
    22     22   **     COMMIT
    23     23   **     ROLLBACK
    24     24   **     PRAGMA
    25     25   **
    26         -** $Id: build.c,v 1.259 2004/11/04 14:30:05 danielk1977 Exp $
           26  +** $Id: build.c,v 1.260 2004/11/04 14:47:12 drh Exp $
    27     27   */
    28     28   #include "sqliteInt.h"
    29     29   #include <ctype.h>
    30     30   
    31     31   /*
    32     32   ** This routine is called when a new SQL statement is beginning to
    33     33   ** be parsed.  Check to see if the schema for the database needs
................................................................................
   275    275       Db *pDb = &db->aDb[i];
   276    276       temp1 = pDb->tblHash;
   277    277       temp2 = pDb->trigHash;
   278    278       sqlite3HashInit(&pDb->trigHash, SQLITE_HASH_STRING, 0);
   279    279       sqlite3HashClear(&pDb->aFKey);
   280    280       sqlite3HashClear(&pDb->idxHash);
   281    281       for(pElem=sqliteHashFirst(&temp2); pElem; pElem=sqliteHashNext(pElem)){
   282         -      Trigger *pTrigger = sqliteHashData(pElem);
   283         -      sqlite3DeleteTrigger(pTrigger);
          282  +      sqlite3DeleteTrigger((Trigger*)sqliteHashData(pElem));
   284    283       }
   285    284       sqlite3HashClear(&temp2);
   286    285       sqlite3HashInit(&pDb->tblHash, SQLITE_HASH_STRING, 0);
   287    286       for(pElem=sqliteHashFirst(&temp1); pElem; pElem=sqliteHashNext(pElem)){
   288    287         Table *pTab = sqliteHashData(pElem);
   289    288         sqlite3DeleteTable(db, pTab);
   290    289       }
................................................................................
  1587   1586   ** Also write code to modify the sqlite_master table and internal schema
  1588   1587   ** if a root-page of another table is moved by the btree-layer whilst
  1589   1588   ** erasing iTable (this can happen with an auto-vacuum database).
  1590   1589   */ 
  1591   1590   static void destroyRootPage(Vdbe *v, int iTable, int iDb){
  1592   1591   #ifndef SQLITE_OMIT_AUTOVACUUM
  1593   1592     int base;
  1594         -#endif
  1595         -  sqlite3VdbeAddOp(v, OP_Destroy, iTable, iDb);
  1596         -#ifndef SQLITE_OMIT_AUTOVACUUM
  1597   1593     /* If SQLITE_OMIT_AUTOVACUUM is not defined, then OP_Destroy pushes
  1598   1594     ** an integer onto the stack. If this integer is non-zero, then it is
  1599   1595     ** the root page number of a table moved to location iTable. The 
  1600   1596     ** following writes VDBE code to modify the sqlite_master table to
  1601   1597     ** reflect this. It is assumed that cursor number 0 is a write-cursor
  1602   1598     ** opened on the sqlite_master table.
  1603   1599     */
................................................................................
  1626   1622       { OP_Column,     0, 1,       0},
  1627   1623       { OP_Column,     0, 2,       0},
  1628   1624       { OP_Integer,    4, 0,       0}, /* 13 */
  1629   1625       { OP_Column,     0, 4,       0},
  1630   1626       { OP_MakeRecord, 5, 0,       0},
  1631   1627       { OP_PutIntKey,  0, 0,       0}  /* 16 */
  1632   1628     };
         1629  +#endif
  1633   1630   
         1631  +  sqlite3VdbeAddOp(v, OP_Destroy, iTable, iDb);
         1632  +#ifndef SQLITE_OMIT_AUTOVACUUM
  1634   1633     base = sqlite3VdbeAddOpList(v, ArraySize(updateMaster), updateMaster);
  1635   1634     sqlite3VdbeChangeP1(v, base+13, iTable);
  1636   1635   #endif
  1637   1636   }
  1638   1637   
  1639   1638   /*
  1640   1639   ** Write VDBE code to erase table pTab and all associated indices on disk.
................................................................................
  1835   1834   void sqlite3CreateForeignKey(
  1836   1835     Parse *pParse,       /* Parsing context */
  1837   1836     ExprList *pFromCol,  /* Columns in this table that point to other table */
  1838   1837     Token *pTo,          /* Name of the other table */
  1839   1838     ExprList *pToCol,    /* Columns in the other table */
  1840   1839     int flags            /* Conflict resolution algorithms. */
  1841   1840   ){
  1842         -  FKey *pFKey = 0;
  1843   1841   #ifndef SQLITE_OMIT_FOREIGN_KEY
         1842  +  FKey *pFKey = 0;
  1844   1843     Table *p = pParse->pNewTable;
  1845   1844     int nByte;
  1846   1845     int i;
  1847   1846     int nCol;
  1848   1847     char *z;
  1849   1848   
  1850   1849     assert( pTo!=0 );

Changes to src/test3.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Code for testing the btree.c module in SQLite.  This code
    13     13   ** is not included in the SQLite library.  It is used for automated
    14     14   ** testing of the SQLite library.
    15     15   **
    16         -** $Id: test3.c,v 1.54 2004/11/04 14:30:06 danielk1977 Exp $
           16  +** $Id: test3.c,v 1.55 2004/11/04 14:47:12 drh Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   #include "pager.h"
    20     20   #include "btree.h"
    21     21   #include "tcl.h"
    22     22   #include <stdlib.h>
    23     23   #include <string.h>
................................................................................
   558    558   static int btree_integrity_check(
   559    559     void *NotUsed,
   560    560     Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
   561    561     int argc,              /* Number of arguments */
   562    562     const char **argv      /* Text of each argument */
   563    563   ){
   564    564     Btree *pBt;
   565         -  char *zResult;
   566    565     int nRoot;
   567    566     int *aRoot;
   568    567     int i;
          568  +  char *zResult;
   569    569   
   570    570     if( argc<3 ){
   571    571       Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
   572    572          " ID ROOT ...\"", 0);
   573    573       return TCL_ERROR;
   574    574     }
   575    575     pBt = sqlite3TextToPtr(argv[1]);
................................................................................
   577    577     aRoot = malloc( sizeof(int)*(argc-2) );
   578    578     for(i=0; i<argc-2; i++){
   579    579       if( Tcl_GetInt(interp, argv[i+2], &aRoot[i]) ) return TCL_ERROR;
   580    580     }
   581    581   #ifndef SQLITE_OMIT_INTEGRITY_CHECK
   582    582     zResult = sqlite3BtreeIntegrityCheck(pBt, aRoot, nRoot);
   583    583   #else
   584         -  zResult = "ok";
          584  +  zResult = 0;
   585    585   #endif
   586    586     if( zResult ){
   587    587       Tcl_AppendResult(interp, zResult, 0);
   588    588       sqliteFree(zResult); 
   589    589     }
   590    590     return TCL_OK;
   591    591   }

Changes to test/attach.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is testing the ATTACH and DETACH commands
    13     13   # and related functionality.
    14     14   #
    15         -# $Id: attach.test,v 1.28 2004/11/04 04:42:28 drh Exp $
           15  +# $Id: attach.test,v 1.29 2004/11/04 14:47:13 drh Exp $
    16     16   #
    17     17   
    18     18   set testdir [file dirname $argv0]
    19     19   source $testdir/tester.tcl
    20     20   
    21     21   for {set i 2} {$i<=15} {incr i} {
    22     22     file delete -force test$i.db
................................................................................
   149    149   do_test attach-1.20.1 {
   150    150     execsql {
   151    151       DETACH db5;
   152    152     }
   153    153     db_list db
   154    154   } {0 main 2 db2 3 db3 4 db4 5 db6 6 db7 7 db8 8 db9 9 db10 10 db11}
   155    155   integrity_check attach-1.20.2
          156  +execsql {select * from sqlite_temp_master}
   156    157   do_test attach-1.21 {
   157    158     catchsql {
   158    159       ATTACH 'test.db' as db12;
   159    160     }
   160    161   } {0 {}}
   161    162   do_test attach-1.22 {
   162    163     catchsql {

Changes to test/btree7.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is btree database backend.
    13     13   #
    14         -# $Id: btree7.test,v 1.1 2004/06/05 00:01:46 drh Exp $
           14  +# $Id: btree7.test,v 1.2 2004/11/04 14:47:13 drh Exp $
    15     15   
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # Stress the balance routine by trying to create situations where
    21     21   # 3 neighboring nodes split into 5.
................................................................................
    35     35       INSERT INTO t1 VALUES(2, '$bigdata');
    36     36       INSERT INTO t1 VALUES(3, '$data450');
    37     37       INSERT INTO t1 VALUES(5, '$data450');
    38     38       INSERT INTO t1 VALUES(8, '$bigdata');
    39     39       INSERT INTO t1 VALUES(9, '$bigdata');
    40     40     "
    41     41   } {}
    42         -#puts [execsql {select * from sqlite_master}]
    43         -#set bt [btree_open test.db 2000 0]
    44         -#btree_tree_dump $bt 2
    45         -do_test btree7-1.2 {
    46         -  execsql {PRAGMA integrity_check}
    47         -} {ok}
           42  +integrity_check btree7-1.2
    48     43   do_test btree7-1.3 {
    49     44     execsql "
    50     45       INSERT INTO t1 VALUES(4, '$bigdata');
    51     46     "
    52     47   } {}
    53         -#btree_tree_dump $bt 2
    54         -do_test btree7-1.4 {
    55         -  execsql {PRAGMA integrity_check}
    56         -} {ok}
           48  +integrity_check btree7-1.4
    57     49   
    58     50   finish_test

Changes to test/collate3.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is page cache subsystem.
    13     13   #
    14         -# $Id: collate3.test,v 1.3 2004/06/19 00:16:31 drh Exp $
           14  +# $Id: collate3.test,v 1.4 2004/11/04 14:47:13 drh Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   #
    20     20   # Tests are organised as follows:
    21     21   #
................................................................................
   217    217     }
   218    218   } {0 {xxx xxx}}
   219    219   do_test collate3-3.6 {
   220    220     catchsql {
   221    221       DELETE FROM collate3t1;
   222    222     }
   223    223   } {0 {}}
   224         -do_test collate3-3.8 {
   225         -  catchsql {
   226         -    PRAGMA integrity_check
   227         -  }
   228         -} {1 {no such collation sequence: string_compare}}
          224  +ifcapable {integrityck} {
          225  +  do_test collate3-3.8 {
          226  +    catchsql {
          227  +      PRAGMA integrity_check
          228  +    }
          229  +  } {1 {no such collation sequence: string_compare}}
          230  +}
   229    231   do_test collate3-3.9 {
   230    232     catchsql {
   231    233       SELECT * FROM collate3t1;
   232    234     }
   233    235   } {0 {}}
   234    236   do_test collate3-3.10 {
   235    237     catchsql {

Changes to test/delete2.test.

    25     25   # index entry was deleted first, before the table entry.  And the index
    26     26   # delete worked.  Thus an entry was deleted from the index but not from
    27     27   # the table.
    28     28   #
    29     29   # The solution to the problem was to detect that the table is locked
    30     30   # before the index entry is deleted.
    31     31   #
    32         -# $Id: delete2.test,v 1.1 2004/08/08 19:43:30 drh Exp $
           32  +# $Id: delete2.test,v 1.2 2004/11/04 14:47:13 drh Exp $
    33     33   #
    34     34   
    35     35   set testdir [file dirname $argv0]
    36     36   source $testdir/tester.tcl
    37     37   
    38     38   # Create a table that has an index.
    39     39   #
................................................................................
    51     51     }
    52     52   } {hello id.1 goodbye id.2 again id.3}
    53     53   do_test delete2-1.2 {
    54     54     execsql {
    55     55       SELECT * FROM q WHERE id='id.1';
    56     56     }
    57     57   } {hello id.1}
    58         -do_test delete2-1.3 {
    59         -  execsql {
    60         -    PRAGMA integrity_check
    61         -  }
    62         -} ok
           58  +integrity_check delete2-1.3
    63     59   
    64     60   # Start a query on the table.  The query should not use the index.
    65     61   # Do not complete the query, thus leaving the table locked.
    66     62   #
    67     63   do_test delete2-1.4 {
    68     64     set STMT [sqlite3_prepare $DB {SELECT * FROM q} -1 TAIL]
    69     65     sqlite3_step $STMT
    70     66   } SQLITE_ROW
    71         -do_test delete2-1.5 {
    72         -  execsql {PRAGMA integrity_check}
    73         -} {ok}
           67  +integrity_check delete2-1.5
    74     68   
    75     69   # Try to delete a row from the table.  The delete should fail.
    76     70   #
    77     71   do_test delete2-1.6 {
    78     72     catchsql {
    79     73       DELETE FROM q WHERE rowid=1
    80     74     }
    81     75   } {1 {database table is locked}}
    82         -do_test delete2-1.7 {
    83         -  execsql {PRAGMA integrity_check}
    84         -} {ok}
           76  +integrity_check delete2-1.7
    85     77   do_test delete2-1.8 {
    86     78     execsql {
    87     79       SELECT * FROM q;
    88     80     }
    89     81   } {hello id.1 goodbye id.2 again id.3}
    90     82   
    91     83   # Finalize the query, thus clearing the lock on the table.  Then
................................................................................
    93     85   #
    94     86   do_test delete2-1.9 {
    95     87     sqlite3_finalize $STMT
    96     88     catchsql {
    97     89       DELETE FROM q WHERE rowid=1
    98     90     }
    99     91   } {0 {}}
   100         -do_test delete2-1.10 {
   101         -  execsql {PRAGMA integrity_check}
   102         -} {ok}
           92  +integrity_check delete2-1.10
   103     93   do_test delete2-1.11 {
   104     94     execsql {
   105     95       SELECT * FROM q;
   106     96     }
   107     97   } {goodbye id.2 again id.3}
   108     98   
   109     99   finish_test

Changes to test/memdb.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is in-memory database backend.
    13     13   #
    14         -# $Id: memdb.test,v 1.9 2004/06/19 00:16:31 drh Exp $
           14  +# $Id: memdb.test,v 1.10 2004/11/04 14:47:13 drh Exp $
    15     15   
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # In the following sequence of tests, compute the MD5 sum of the content
    21     21   # of a table, make lots of modifications to that table, then do a rollback.
................................................................................
   107    107            INSERT INTO t3 SELECT randstr(10,400) FROM t3 WHERE random()%10==0;
   108    108          }
   109    109       } {}
   110    110     }
   111    111     set ::pager_old_format 0
   112    112   }
   113    113   
   114         -do_test memdb-2.1 {
   115         -  execsql {
   116         -    PRAGMA integrity_check
   117         -  }
   118         -} {ok}
          114  +integrity_check memdb-2.1
   119    115   
   120    116   do_test memdb-3.1 {
   121    117     execsql {
   122    118       CREATE TABLE t4(a,b,c,d);
   123    119       BEGIN;
   124    120       INSERT INTO t4 VALUES(1,2,3,4);
   125    121       SELECT * FROM t4;

Changes to test/misc3.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.
    12     12   #
    13     13   # This file implements tests for miscellanous features that were
    14     14   # left out of other test files.
    15     15   #
    16         -# $Id: misc3.test,v 1.14 2004/11/04 04:42:28 drh Exp $
           16  +# $Id: misc3.test,v 1.15 2004/11/04 14:47:13 drh Exp $
    17     17   
    18     18   set testdir [file dirname $argv0]
    19     19   source $testdir/tester.tcl
    20     20   
    21     21   ifcapable {integrityck} {
    22     22     # Ticket #529.  Make sure an ABORT does not damage the in-memory cache
    23     23     # that will be used by subsequent statements in the same transaction.
................................................................................
   102    102   do_test misc3-2.9 {
   103    103     execsql {SELECT 2.0e-27 * '+0.000005e+132'}
   104    104   } 1e+100
   105    105   
   106    106   # Ticket #522.  Make sure integer overflow is handled properly in
   107    107   # indices.
   108    108   #
   109         -do_test misc3-3.1 {
   110         -  execsql {PRAGMA integrity_check}
   111         -} ok
          109  +integrity_check misc3-3.1
   112    110   do_test misc3-3.2 {
   113    111     execsql {
   114    112       CREATE TABLE t2(a INT UNIQUE);
   115         -    PRAGMA integrity_check;
   116    113     }
   117         -} ok
          114  +} {}
          115  +integrity_check misc3-3.2.1
   118    116   do_test misc3-3.3 {
   119    117     execsql {
   120    118       INSERT INTO t2 VALUES(2147483648);
   121         -    PRAGMA integrity_check;
   122    119     }
   123         -} ok
          120  +} {}
          121  +integrity_check misc3-3.3.1
   124    122   do_test misc3-3.4 {
   125    123     execsql {
   126    124       INSERT INTO t2 VALUES(-2147483649);
   127         -    PRAGMA integrity_check;
   128    125     }
   129         -} ok
          126  +} {}
          127  +integrity_check misc3-3.4.1
   130    128   do_test misc3-3.5 {
   131    129     execsql {
   132    130       INSERT INTO t2 VALUES(+2147483649);
   133         -    PRAGMA integrity_check;
   134    131     }
   135         -} ok
          132  +} {}
          133  +integrity_check misc3-3.5.1
   136    134   do_test misc3-3.6 {
   137    135     execsql {
   138    136       INSERT INTO t2 VALUES(+2147483647);
   139    137       INSERT INTO t2 VALUES(-2147483648);
   140    138       INSERT INTO t2 VALUES(-2147483647);
   141    139       INSERT INTO t2 VALUES(2147483646);
   142    140       SELECT * FROM t2 ORDER BY a;

Changes to test/pager3.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is page cache subsystem.
    13     13   #
    14         -# $Id: pager3.test,v 1.1 2004/08/18 19:09:44 drh Exp $
           14  +# $Id: pager3.test,v 1.2 2004/11/04 14:47:13 drh Exp $
    15     15   
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # This test makes sure the database file is truncated back to the correct
    21     21   # length on a rollback.
................................................................................
    55     55       insert into t1 select 4-a, b from t2;  ----- NOTE (2)
    56     56     }
    57     57     execsql {
    58     58       rollback;  ------- NOTE (3)
    59     59     }
    60     60     db close
    61     61     sqlite3 db test.db
    62         -  execsql {
    63         -    pragma integrity_check;
           62  +  set r ok
           63  +  ifcapable {integrityck} {
           64  +    set r [execsql {
           65  +      pragma integrity_check;
           66  +    }]
    64     67     }
           68  +  set r
    65     69   } ok
    66         -
    67     70   
    68     71   finish_test

Changes to test/pragma.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.
    12     12   #
    13     13   # This file implements tests for the PRAGMA command.
    14     14   #
    15         -# $Id: pragma.test,v 1.20 2004/11/03 16:27:02 drh Exp $
           15  +# $Id: pragma.test,v 1.21 2004/11/04 14:47:13 drh Exp $
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # Test organization:
    21     21   #
    22     22   # pragma-1.*: Test cache_size, default_cache_size and synchronous on main db.
................................................................................
   216    216       CREATE INDEX i2 ON t2(a);
   217    217       INSERT INTO t2 VALUES(11,2,3);
   218    218       INSERT INTO t2 VALUES(22,3,4);
   219    219       COMMIT;
   220    220       SELECT rowid, * from t2;
   221    221     }
   222    222   } {1 11 2 3 2 22 3 4}
   223         -if {![sqlite3 -has-codec]} {
          223  +if {![sqlite3 -has-codec] && $sqlite_options(integrityck)} {
   224    224     do_test pragma-3.2 {
   225    225       set rootpage [execsql {SELECT rootpage FROM sqlite_master WHERE name='i2'}]
   226    226       set db [btree_open test.db 100 0]
   227    227       btree_begin_transaction $db
   228    228       set c [btree_cursor $db $rootpage 1]
   229    229       btree_first $c
   230    230       btree_delete $c
................................................................................
   303    303   } {2}
   304    304   catchsql {COMMIT;}
   305    305   
   306    306   # Test schema-query pragmas
   307    307   #
   308    308   do_test pragma-6.1 {
   309    309     set res {}
          310  +  execsql {SELECT * FROM sqlite_temp_master}
   310    311     foreach {idx name file} [execsql {pragma database_list}] {
   311    312       lappend res $idx $name
   312    313     }
   313    314     set res
   314    315   } {0 main 1 temp 2 aux}
   315    316   do_test pragma-6.2 {
   316    317     execsql {

Changes to test/trigger2.test.

   189    189         DROP TABLE other_tbl;
   190    190   
   191    191         SELECT * FROM rlog;
   192    192       }
   193    193     } [list 1 0 0 0.0 0.0 5 6 \
   194    194             2 0 0 5.0 6.0 5 6 ]
   195    195   
   196         -  do_test trigger2-1.$ii.4 {
   197         -    execsql {
   198         -      PRAGMA integrity_check;
   199         -    }
   200         -  } {ok}
          196  +  integrity_check trigger2-1.$ii.4
   201    197   }
   202    198   catchsql {
   203    199     DROP TABLE rlog;
   204    200     DROP TABLE clog;
   205    201     DROP TABLE tbl;
   206    202     DROP TABLE other_tbl;
   207    203   }
................................................................................
   311    307       execsql "DELETE FROM tbl; DELETE FROM log; $prep";
   312    308       execsql "CREATE TRIGGER the_trigger AFTER [string range $statement 0 6]\
   313    309                ON tbl BEGIN $tr_program_fixed END;"
   314    310   
   315    311       do_test trigger2-2.$ii-after "execsql {$statement $query}" $after_data
   316    312       execsql "DROP TRIGGER the_trigger;"
   317    313   
   318         -    do_test trigger2-2.$ii-integrity {
   319         -      execsql {
   320         -        PRAGMA integrity_check;
   321         -      }
   322         -    } {ok}
   323         -
          314  +    integrity_check trigger2-2.$ii-integrity
   324    315     }
   325    316   }
   326    317   catchsql {
   327    318     DROP TABLE tbl;
   328    319     DROP TABLE log;
   329    320   }
   330    321   
................................................................................
   387    378       UPDATE log SET a = 0;
   388    379     }
   389    380   } {1 0 1}
   390    381   execsql {
   391    382     DROP TABLE tbl;
   392    383     DROP TABLE log;
   393    384   }
   394         -do_test trigger2-3.3 {
   395         -  execsql {
   396         -    PRAGMA integrity_check;
   397         -  }
   398         -} {ok}
          385  +integrity_check trigger2-3.3
   399    386   
   400    387   # Simple cascaded trigger
   401    388   execsql {
   402    389     CREATE TABLE tblA(a, b);
   403    390     CREATE TABLE tblB(a, b);
   404    391     CREATE TABLE tblC(a, b);
   405    392   
................................................................................
   719    706       END;
   720    707       DELETE FROM v1log;
   721    708       UPDATE v1 SET x=x+100, y=y+200, z=z+300;
   722    709       SELECT * FROM v1log;
   723    710     }
   724    711   } {3 103 5 205 4 304 9 109 11 211 10 310}
   725    712   
   726         -do_test trigger2-9.9 {
   727         -  execsql {PRAGMA integrity_check}
   728         -} {ok}
          713  +integrity_check trigger2-9.9
   729    714   
   730    715   finish_test