/ Check-in [a5080593]
Login

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

Overview
Comment:Fix a bug in test script fts5fault4.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fts5
Files: files | file ages | folders
SHA1:a508059305641c2cb53197b0f6e93d7b723697e2
User & Date: dan 2015-05-18 18:24:41
Context
2015-05-18
20:34
Improve test coverage of fts5_storage.c. check-in: 4dfe2e58 user: dan tags: fts5
18:24
Fix a bug in test script fts5fault4.test. check-in: a5080593 user: dan tags: fts5
18:03
Add a test for an untested branch in fts5_expr.c. check-in: ce08206b user: dan tags: fts5
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/test/fts5fault4.test.

    18     18   
    19     19   # If SQLITE_ENABLE_FTS3 is defined, omit this file.
    20     20   ifcapable !fts5 {
    21     21     finish_test
    22     22     return
    23     23   }
    24     24   
    25         -if 1 {
    26         -
    27     25   #-------------------------------------------------------------------------
    28     26   # An OOM while dropping an fts5 table.
    29     27   #
    30     28   db func rnddoc fts5_rnddoc 
    31     29   do_test 1.0 {
    32     30     execsql { CREATE VIRTUAL TABLE xx USING fts5(x) }
    33     31   } {}
................................................................................
   298    296   
   299    297   do_faultsim_test 9.1 -faults oom-* -body {
   300    298     db eval { SELECT rowid FROM tt WHERE tt MATCH 'a NOT x' }
   301    299   } -test {
   302    300     faultsim_test_result {0 {50 100 150 200}} {1 SQLITE_NOMEM}
   303    301   }
   304    302   
   305         -}
   306         -
   307    303   #-------------------------------------------------------------------------
   308    304   # OOM in fts5_expr() SQL function.
   309    305   #
   310    306   do_faultsim_test 10.1 -faults oom-t* -body {
   311    307     db one { SELECT fts5_expr('a AND b NEAR(a b)') }
   312    308   } -test {
   313    309     faultsim_test_result {0 {"a" AND ("b" AND NEAR("a" "b", 10))}} 
................................................................................
   329    325   #-------------------------------------------------------------------------
   330    326   # OOM while configuring 'rank' option.
   331    327   #
   332    328   reset_db
   333    329   do_execsql_test 11.0 {
   334    330     CREATE VIRTUAL TABLE ft USING fts5(x);
   335    331   }
   336         -do_faultsim_test 11.1 -faults oom-* -body {
   337         -  db eval { 
   338         -    INSERT INTO ft(ft, rank) VALUES('rank', 'bm25(10.0, 5.0)');
   339         -  }
          332  +do_faultsim_test 11.1 -faults oom-t* -body {
          333  +  db eval { INSERT INTO ft(ft, rank) VALUES('rank', 'bm25(10.0, 5.0)') }
   340    334   } -test {
   341         -  faultsim_test_result {0 {}}
          335  +  faultsim_test_result {0 {}} {1 {disk I/O error}}
   342    336   }
   343    337   
   344    338   finish_test
   345    339