/ Check-in [30018d31]
Login

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

Overview
Comment:Fix a couple of test scripts so that they work with -DSQLITE_DISABLE_FTS4_DEFERRED builds.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:30018d31068f3182d713a6cf09753b27b16a6f912d39a5e6c1363da83bec3125
User & Date: dan 2017-05-10 13:36:04
Context
2017-05-10
16:12
Invoke the SQLITE_READ authorizer callback with a NULL column name for any table referenced by a query but from when no columns are extracted. check-in: 92ab1f72 user: drh tags: trunk
13:36
Fix a couple of test scripts so that they work with -DSQLITE_DISABLE_FTS4_DEFERRED builds. check-in: 30018d31 user: dan tags: trunk
12:58
Avoid unnecessary codec operations on in-memory subjournals. check-in: 199b2a84 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/fts3fault.test.

   173    173     execsql "INSERT INTO t8 VALUES('[string repeat {c } 50000]')"
   174    174     execsql "INSERT INTO t8 VALUES('d d d')"
   175    175     execsql "INSERT INTO t8 VALUES('e e e')"
   176    176     execsql "INSERT INTO t8(t8) VALUES('optimize')"
   177    177     faultsim_save_and_close
   178    178   } {}
   179    179   
   180         -do_faultsim_test 8.1 -faults oom-t* -prep { 
   181         -  faultsim_restore_and_reopen
   182         -  db func mit mit
   183         -} -body {
   184         -  execsql { SELECT mit(matchinfo(t8, 'x')) FROM t8 WHERE t8 MATCH 'a b c' }
   185         -} -test {
   186         -  faultsim_test_result {0 {{1 1 1 1 4 2 1 5 5}}}
          180  +ifcapable fts4_deferred {
          181  +  do_faultsim_test 8.1 -faults oom-t* -prep { 
          182  +    faultsim_restore_and_reopen
          183  +    db func mit mit
          184  +  } -body {
          185  +    execsql { SELECT mit(matchinfo(t8, 'x')) FROM t8 WHERE t8 MATCH 'a b c' }
          186  +  } -test {
          187  +    faultsim_test_result {0 {{1 1 1 1 4 2 1 5 5}}}
          188  +  }
   187    189   }
   188    190   
   189    191   do_faultsim_test 8.2 -faults oom-t* -prep { 
   190    192     faultsim_restore_and_reopen
   191    193     db func mit mit
   192    194   } -body {
   193    195     execsql { SELECT mit(matchinfo(t8, 's')) FROM t8 WHERE t8 MATCH 'a b c' }

Changes to test/fts3misc.test.

   143    143   do_execsql_test 3.1.5 {
   144    144     SELECT rowid FROM t3 WHERE t3 MATCH '"2 3 4 5 6 7 8 9"'
   145    145   } {4}
   146    146   
   147    147   #-------------------------------------------------------------------------
   148    148   #
   149    149   reset_db
   150         -do_execsql_test 4.0 {
   151         -  PRAGMA page_size = 512;
   152         -  CREATE VIRTUAL TABLE t4 USING fts4;
   153         -  WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<8000 )
   154         -  INSERT INTO t4 SELECT 'a b c a b c a b c' FROM s;
   155         -}
   156         -do_execsql_test 4.1 {
   157         -  SELECT count(*) FROM t4 WHERE t4 MATCH '"a b c" OR "c a b"'
   158         -} {8000}
   159         -do_execsql_test 4.2 {
   160         -  SELECT quote(value) from t4_stat where id=0
   161         -} {X'C03EC0B204C0A608'}
   162         -do_execsql_test 4.3 {
   163         -  UPDATE t4_stat SET value = X'C03EC0B204C0A60800' WHERE id=0;
   164         -}
   165         -do_catchsql_test 4.4 {
   166         -  SELECT count(*) FROM t4 WHERE t4 MATCH '"a b c" OR "c a b"'
   167         -} {1 {database disk image is malformed}}
   168         -do_execsql_test 4.5 {
   169         -  UPDATE t4_stat SET value = X'00C03EC0B204C0A608' WHERE id=0;
   170         -}
   171         -do_catchsql_test 4.6 {
   172         -  SELECT count(*) FROM t4 WHERE t4 MATCH '"a b c" OR "c a b"'
   173         -} {1 {database disk image is malformed}}
          150  +ifcapable fts4_deferred {
          151  +  do_execsql_test 4.0 {
          152  +    PRAGMA page_size = 512;
          153  +    CREATE VIRTUAL TABLE t4 USING fts4;
          154  +    WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<8000 )
          155  +    INSERT INTO t4 SELECT 'a b c a b c a b c' FROM s;
          156  +  }
          157  +  do_execsql_test 4.1 {
          158  +    SELECT count(*) FROM t4 WHERE t4 MATCH '"a b c" OR "c a b"'
          159  +  } {8000}
          160  +  do_execsql_test 4.2 {
          161  +    SELECT quote(value) from t4_stat where id=0
          162  +  } {X'C03EC0B204C0A608'}
          163  +  do_execsql_test 4.3 {
          164  +    UPDATE t4_stat SET value = X'C03EC0B204C0A60800' WHERE id=0;
          165  +  }
          166  +  do_catchsql_test 4.4 {
          167  +    SELECT count(*) FROM t4 WHERE t4 MATCH '"a b c" OR "c a b"'
          168  +  } {1 {database disk image is malformed}}
          169  +  do_execsql_test 4.5 {
          170  +    UPDATE t4_stat SET value = X'00C03EC0B204C0A608' WHERE id=0;
          171  +  }
          172  +  do_catchsql_test 4.6 {
          173  +    SELECT count(*) FROM t4 WHERE t4 MATCH '"a b c" OR "c a b"'
          174  +  } {1 {database disk image is malformed}}
          175  +}
   174    176   
   175    177   #-------------------------------------------------------------------------
   176    178   #
   177    179   reset_db
   178    180   do_execsql_test 5.0 {
   179    181     CREATE VIRTUAL TABLE t5 USING fts4;
   180    182     INSERT INTO t5 VALUES('a x x x x b x x x x c');