/ Check-in [c6ba81fc]
Login

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

Overview
Comment:Fix a problem with IO error handling in the rebuild-index code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fts4-content
Files: files | file ages | folders
SHA1: c6ba81fcad32192674bd510e607f787adc1f7038
User & Date: dan 2011-10-05 06:07:00
Context
2011-10-05
15:11
Change FTS4 so that if both the content=xxx option and column names are specified, the virtual table assumes that the named columns correspond to columns of table xxx. check-in: 289ee431 user: dan tags: fts4-content
06:07
Fix a problem with IO error handling in the rebuild-index code. check-in: c6ba81fc user: dan tags: fts4-content
2011-10-04
19:41
Improve test coverage of fts3.c. check-in: 0f439944 user: dan tags: fts4-content
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3_write.c.

  2997   2997       }
  2998   2998       if( p->bHasStat ){
  2999   2999         fts3UpdateDocTotals(&rc, p, aSzIns, aSzDel, nEntry);
  3000   3000       }
  3001   3001       sqlite3_free(aSz);
  3002   3002   
  3003   3003       if( pStmt ){
  3004         -      assert( rc==SQLITE_OK );
  3005         -      rc = sqlite3_finalize(pStmt);
         3004  +      int rc2 = sqlite3_finalize(pStmt);
         3005  +      if( rc==SQLITE_OK ){
         3006  +        rc = rc2;
         3007  +      }
  3006   3008       }
  3007   3009     }
  3008   3010   
  3009   3011     return rc;
  3010   3012   }
  3011   3013   
  3012   3014   /*

Changes to test/fts3fault2.test.

   100    100   } -body {
   101    101     execsql {
   102    102       CREATE VIRTUAL TABLE tt USING fts4(compress=zip, uncompress=unzip);
   103    103     }
   104    104   } -test {
   105    105     faultsim_test_result {0 {}}
   106    106   }
          107  +
          108  +do_test 4.0 {
          109  +  faultsim_delete_and_reopen
          110  +  execsql {
          111  +    CREATE VIRTUAL TABLE ft USING fts4(a, b);
          112  +    INSERT INTO ft VALUES('U U T C O', 'F N D E S');
          113  +    INSERT INTO ft VALUES('P H X G B', 'I D M R U');
          114  +    INSERT INTO ft VALUES('P P X D M', 'Y V N T C');
          115  +    INSERT INTO ft VALUES('Z L Q O W', 'D F U N Q');
          116  +    INSERT INTO ft VALUES('A J D U P', 'C H M Q E');
          117  +    INSERT INTO ft VALUES('P S A O H', 'S Z C W D');
          118  +    INSERT INTO ft VALUES('T B N L W', 'C A K T I');
          119  +    INSERT INTO ft VALUES('K E Z L O', 'L L Y C E');
          120  +    INSERT INTO ft VALUES('C R E S V', 'Q V F W P');
          121  +    INSERT INTO ft VALUES('S K H G W', 'R W Q F G');
          122  +  }
          123  +  faultsim_save_and_close
          124  +} {}
          125  +do_faultsim_test 4.1 -prep {
          126  +  faultsim_restore_and_reopen
          127  +  db eval {SELECT * FROM sqlite_master}
          128  +} -body {
          129  +  execsql { INSERT INTO ft(ft) VALUES('rebuild') }
          130  +} -test {
          131  +  faultsim_test_result {0 {}}
          132  +}
   107    133   
   108    134   finish_test