Recent changes to FTS3 apparently require that SQLite must be compiled with pager pragmas, otherwise FTS3 will cause a division by zero exception as I have experienced right now.
This means that the FTS3 extension can crash an application if the core SQLite library is compiled with SQLITE_OMIT_PAGER_PRAGMAS. The following SQL triggers the exception, based on the table data in fts4aa.test: SELECT docid, mit(matchinfo(t1)) FROM t1 WHERE t1 MATCH 'spake hebrew' ORDER BY docid; Debugging is not available to me, but as far as I read the code, FTS3's dependency on pager pragmas was introduced by check-in 5ae0ba447a on 2010-10-19. With SQLITE_OMIT_PAGER_PRAGMAS, the "PRAGMA %Q.page_size" command in fts3.c, fts3DatabasePageSize() silently returns 0 instead of reporting an appropriate error message, which can then lead to a division by zero exception, most likely in fts3_write.c, sqlite3Fts3SegReaderCost(). Given that the FTS3 extension can potentially be linked against a SQLite core compiled with SQLITE_OMIT_PAGER_PRAGMAS and cause unexpected failure, this might be worth a workaround or error message. Ralf _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users