/ Check-in [b53a9a3d]
Login

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

Overview
Comment:Update some test cases to account for SQLITE_OMIT_VIRTUAL_TABLE builds.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b53a9a3dc6b0422a102b245451769b0cd8c0d67090fefabf7cb3a65137a73771
User & Date: dan 2018-11-28 11:49:46
Context
2018-11-28
19:12
Update incrvacuum.test so that it works with builds that do not support mmap(). check-in: 8eb62fd5 user: dan tags: trunk
11:49
Update some test cases to account for SQLITE_OMIT_VIRTUAL_TABLE builds. check-in: b53a9a3d user: dan tags: trunk
11:09
Follow-up to [0bf0fd242b93c3bd30]: only reset the pager when adding a new codec, not when overwriting an existing codec. Also, improve a comment in the pcache1 subsystem. check-in: 5c040fdb user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/attach.test.

   722    722       catchsql {
   723    723         CREATE TRIGGER r5 AFTER INSERT ON t5 BEGIN
   724    724           DELETE FROM t1 WHERE x<(SELECT min(x) FROM temp.t6);
   725    725         END;
   726    726       } db2
   727    727     } {1 {trigger r5 cannot reference objects in database temp}}
   728    728   } ;# endif subquery
   729         -ifcapable json1 {
          729  +ifcapable json1&&vtab {
   730    730     do_test attach-5.10 {
   731    731       db close
   732    732       catch {db2 close}
   733    733       forcedelete test.db
   734    734       sqlite3 db test.db
   735    735       db eval {
   736    736         CREATE TABLE t1(x);

Changes to test/indexexpr2.test.

   197    197     set ::cnt
   198    198     # Refcnt() should not be invoked because that index does not change.
   199    199   } {0}
   200    200   
   201    201   # Additional test cases to show that UPDATE does not modify indexes that
   202    202   # do not involve unchanged columns.
   203    203   #
   204         -load_static_extension db explain
   205         -do_execsql_test 4.200 {
   206         -  CREATE TABLE t2(a,b,c,d,e,f);
   207         -  INSERT INTO t2 VALUES(2,3,4,5,6,7);
   208         -  CREATE INDEX t2abc ON t2(a+b+c);
   209         -  CREATE INDEX t2cd ON t2(c*d);
   210         -  CREATE INDEX t2def ON t2(d,e+25*f);
   211         -  SELECT sqlite_master.name 
   212         -    FROM sqlite_master, explain('UPDATE t2 SET b=b+1')
   213         -   WHERE explain.opcode LIKE 'Open%'
   214         -     AND sqlite_master.rootpage=explain.p2
   215         -   ORDER BY 1;
   216         -} {t2 t2abc}
   217         -do_execsql_test 4.210 {
   218         -  SELECT sqlite_master.name 
   219         -    FROM sqlite_master, explain('UPDATE t2 SET c=c+1')
   220         -   WHERE explain.opcode LIKE 'Open%'
   221         -     AND sqlite_master.rootpage=explain.p2
   222         -   ORDER BY 1;
   223         -} {t2 t2abc t2cd}
   224         -do_execsql_test 4.220 {
   225         -  SELECT sqlite_master.name 
   226         -    FROM sqlite_master, explain('UPDATE t2 SET c=c+1, f=NULL')
   227         -   WHERE explain.opcode LIKE 'Open%'
   228         -     AND sqlite_master.rootpage=explain.p2
   229         -   ORDER BY 1;
   230         -} {t2 t2abc t2cd t2def}
          204  +ifcapable vtab {
          205  +  load_static_extension db explain
          206  +  do_execsql_test 4.200 {
          207  +    CREATE TABLE t2(a,b,c,d,e,f);
          208  +    INSERT INTO t2 VALUES(2,3,4,5,6,7);
          209  +    CREATE INDEX t2abc ON t2(a+b+c);
          210  +    CREATE INDEX t2cd ON t2(c*d);
          211  +    CREATE INDEX t2def ON t2(d,e+25*f);
          212  +    SELECT sqlite_master.name 
          213  +      FROM sqlite_master, explain('UPDATE t2 SET b=b+1')
          214  +     WHERE explain.opcode LIKE 'Open%'
          215  +       AND sqlite_master.rootpage=explain.p2
          216  +     ORDER BY 1;
          217  +  } {t2 t2abc}
          218  +  do_execsql_test 4.210 {
          219  +    SELECT sqlite_master.name 
          220  +      FROM sqlite_master, explain('UPDATE t2 SET c=c+1')
          221  +     WHERE explain.opcode LIKE 'Open%'
          222  +       AND sqlite_master.rootpage=explain.p2
          223  +     ORDER BY 1;
          224  +  } {t2 t2abc t2cd}
          225  +  do_execsql_test 4.220 {
          226  +    SELECT sqlite_master.name 
          227  +      FROM sqlite_master, explain('UPDATE t2 SET c=c+1, f=NULL')
          228  +     WHERE explain.opcode LIKE 'Open%'
          229  +       AND sqlite_master.rootpage=explain.p2
          230  +     ORDER BY 1;
          231  +  } {t2 t2abc t2cd t2def}
          232  +}
   231    233   
   232    234   
   233    235   finish_test

Changes to test/pragma4.test.

   130    130   reset_db
   131    131   forcedelete test.db2
   132    132   do_execsql_test 4.2.1 {
   133    133     CREATE TABLE t1(a, b, c);
   134    134     ATTACH 'test.db2' AS aux;
   135    135     CREATE TABLE aux.t2(d, e, f);
   136    136   }
   137         -do_execsql_test 4.2.2 { SELECT * FROM pragma_table_info('t1') } {
   138         -  0 a {} 0 {} 0 1 b {} 0 {} 0 2 c {} 0 {} 0
   139         -}
   140         -do_execsql_test 4.2.3 { SELECT * FROM pragma_table_info('t2') } {
   141         -  0 d {} 0 {} 0 1 e {} 0 {} 0 2 f {} 0 {} 0
          137  +ifcapable vtab {
          138  +  do_execsql_test 4.2.2 { SELECT * FROM pragma_table_info('t1') } {
          139  +    0 a {} 0 {} 0 1 b {} 0 {} 0 2 c {} 0 {} 0
          140  +  }
          141  +  do_execsql_test 4.2.3 { SELECT * FROM pragma_table_info('t2') } {
          142  +    0 d {} 0 {} 0 1 e {} 0 {} 0 2 f {} 0 {} 0
          143  +  }
   142    144   }
   143    145   do_test 4.2.4 { 
   144    146     sqlite3 db3 test.db
   145    147     sqlite3 db2 test.db2
   146    148     execsql { DROP TABLE t1 } db3
   147    149     execsql { DROP TABLE t2 } db2
   148    150   } {}
   149         -do_execsql_test 4.2.5 { SELECT * FROM pragma_table_info('t1') } 
   150         -do_execsql_test 4.2.6 { SELECT * FROM pragma_table_info('t2') } 
          151  +ifcapable vtab {
          152  +  do_execsql_test 4.2.5 { SELECT * FROM pragma_table_info('t1') } 
          153  +  do_execsql_test 4.2.6 { SELECT * FROM pragma_table_info('t2') } 
          154  +}
   151    155   
   152    156   db2 close
   153    157   db3 close
   154    158   reset_db
   155    159   forcedelete test.db2
   156    160   do_execsql_test 4.3.1 {
   157    161     CREATE TABLE t1(a, b, c);
   158    162     CREATE INDEX i1 ON t1(b);
   159    163     ATTACH 'test.db2' AS aux;
   160    164     CREATE TABLE aux.t2(d, e, f);
   161    165     CREATE INDEX aux.i2 ON t2(e);
   162    166   }
   163         -do_execsql_test 4.3.2 { SELECT * FROM pragma_index_info('i1') } {0 1 b}
   164         -do_execsql_test 4.3.3 { SELECT * FROM pragma_index_info('i2') } {0 1 e}
          167  +ifcapable vtab {
          168  +  do_execsql_test 4.3.2 { SELECT * FROM pragma_index_info('i1') } {0 1 b}
          169  +  do_execsql_test 4.3.3 { SELECT * FROM pragma_index_info('i2') } {0 1 e}
          170  +}
   165    171   do_test 4.3.4 { 
   166    172     sqlite3 db3 test.db
   167    173     sqlite3 db2 test.db2
   168    174     execsql { DROP INDEX i1 } db3
   169    175     execsql { DROP INDEX i2 } db2
   170    176   } {}
   171         -do_execsql_test 4.3.5 { SELECT * FROM pragma_index_info('i1') } 
   172         -do_execsql_test 4.3.6 { SELECT * FROM pragma_index_info('i2') } 
          177  +ifcapable vtab {
          178  +  do_execsql_test 4.3.5 { SELECT * FROM pragma_index_info('i1') } 
          179  +  do_execsql_test 4.3.6 { SELECT * FROM pragma_index_info('i2') } 
          180  +}
   173    181   
          182  +execsql {SELECT * FROM main.sqlite_master, aux.sqlite_master}
   174    183   do_execsql_test 4.4.0 {
   175    184     CREATE INDEX main.i1 ON t1(b, c);
   176    185     CREATE INDEX aux.i2 ON t2(e, f);
   177    186   }
   178         -do_execsql_test 4.4.1 { SELECT * FROM pragma_index_list('t1') } {0 i1 0 c 0}
   179         -do_execsql_test 4.4.2 { SELECT * FROM pragma_index_list('t2') } {0 i2 0 c 0}
          187  +ifcapable vtab {
          188  +  do_execsql_test 4.4.1 { SELECT * FROM pragma_index_list('t1') } {0 i1 0 c 0}
          189  +  do_execsql_test 4.4.2 { SELECT * FROM pragma_index_list('t2') } {0 i2 0 c 0}
          190  +}
   180    191   do_test 4.4.3 { 
   181    192     execsql { DROP INDEX i1 } db3
   182    193     execsql { DROP INDEX i2 } db2
   183    194   } {}
   184         -do_execsql_test 4.4.5 { SELECT * FROM pragma_index_list('t1') } {}
   185         -do_execsql_test 4.4.6 { SELECT * FROM pragma_index_list('t2') } {}
          195  +ifcapable vtab {
          196  +  do_execsql_test 4.4.5 { SELECT * FROM pragma_index_list('t1') } {}
          197  +  do_execsql_test 4.4.6 { SELECT * FROM pragma_index_list('t2') } {}
          198  +}
          199  +execsql {SELECT * FROM main.sqlite_master, aux.sqlite_master}
   186    200   
   187    201   do_execsql_test 4.5.0 {
   188    202     CREATE UNIQUE INDEX main.i1 ON t1(a);
   189    203     CREATE UNIQUE INDEX aux.i2 ON t2(d);
   190    204     CREATE TABLE main.c1 (a, b, c REFERENCES t1(a));
   191    205     CREATE TABLE aux.c2 (d, e, r REFERENCES t2(d));
   192    206   }
   193         -do_execsql_test 4.5.1 { SELECT * FROM pragma_foreign_key_list('c1') } {
   194         -  0 0 t1 c a {NO ACTION} {NO ACTION} NONE
   195         -}
   196         -do_execsql_test 4.5.2 { SELECT * FROM pragma_foreign_key_list('c2') } {
   197         -  0 0 t2 r d {NO ACTION} {NO ACTION} NONE
          207  +ifcapable vtab {
          208  +  do_execsql_test 4.5.1 { SELECT * FROM pragma_foreign_key_list('c1') } {
          209  +    0 0 t1 c a {NO ACTION} {NO ACTION} NONE
          210  +  }
          211  +  do_execsql_test 4.5.2 { SELECT * FROM pragma_foreign_key_list('c2') } {
          212  +    0 0 t2 r d {NO ACTION} {NO ACTION} NONE
          213  +  }
   198    214   }
   199    215   do_test 4.5.3 { 
   200    216     execsql { DROP TABLE c1 } db3
   201    217     execsql { DROP TABLE c2 } db2
   202    218   } {}
   203         -do_execsql_test 4.5.1 { SELECT * FROM pragma_foreign_key_list('c1') }
   204         -do_execsql_test 4.5.2 { SELECT * FROM pragma_foreign_key_list('c2') } 
          219  +ifcapable vtab {
          220  +  do_execsql_test 4.5.4 { SELECT * FROM pragma_foreign_key_list('c1') }
          221  +  do_execsql_test 4.5.5 { SELECT * FROM pragma_foreign_key_list('c2') } 
          222  +}
          223  +execsql {SELECT * FROM main.sqlite_master, aux.sqlite_master}
   205    224   
   206    225   do_execsql_test 4.6.0 {
   207    226     CREATE TABLE main.c1 (a, b, c REFERENCES t1(a));
   208    227     CREATE TABLE aux.c2 (d, e, r REFERENCES t2(d));
   209    228     INSERT INTO main.c1 VALUES(1, 2, 3);
   210    229     INSERT INTO aux.c2 VALUES(4, 5, 6);
   211    230   }