Re: [sqlite] rtree woes with SQLITE_OMMIT_...
>> I am running the rtree module against an SQLite build which has >> lots of functionality SQLITE_OMIT_...ed. > >Can you be more specific? Exactly which SQLITE_OMIT symbols >are defined? Sure. Here is the list: SQLITE_OMIT_ALTERTABLE SQLITE_OMIT_ANALYZE SQLITE_OMIT_ATTACH SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_AUTOINCREMENT SQLITE_OMIT_AUTOVACUUM SQLITE_OMIT_BETWEEN_OPTIMIZATION SQLITE_OMIT_BLOB_LITERAL SQLITE_OMIT_CAST SQLITE_OMIT_CHECK SQLITE_OMIT_COMPLETE SQLITE_OMIT_COMPOUND_SELECT SQLITE_OMIT_EXPLAIN SQLITE_OMIT_FLAG_PRAGMAS SQLITE_OMIT_FOREIGN_KEY SQLITE_OMIT_GET_TABLE SQLITE_OMIT_GLOBALRECOVER SQLITE_OMIT_INCRBLOB SQLITE_OMIT_INTEGRITY_CHECK SQLITE_OMIT_LIKE_OPTIMIZATION SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_MEMORYDB SQLITE_OMIT_OR_OPTIMIZATION SQLITE_OMIT_PAGER_PRAGMAS SQLITE_OMIT_PROGRESS_CALLBACK SQLITE_OMIT_QUICKBALANCE SQLITE_OMIT_REINDEX SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_SUBQUERY SQLITE_OMIT_TCL_VARIABLE SQLITE_OMIT_TEMPDB SQLITE_OMIT_TRACE SQLITE_OMIT_TRIGGER SQLITE_OMIT_UTF16 SQLITE_OMIT_VACUUM SQLITE_OMIT_VIEW SQLITE_OMIT_XFER_OPT I have reconstructed a few tests from rtree1.test and the errors only show with the SQLITE_OIMIT_... symbols defined. Otherwise the tests run just fine. >Rtree uses ALTER TABLE as part of the xRename() callback. The >xRename() callback is invoked when the sqlite user does an >ALTER TABLE. So, the rtree code that uses ALTER TABLE will >never be invoked when the module is being used by an sqlite >build that does not support ALTER TABLE. I suspect the same >is true of fts3. Right, I did not think of the fact that with SQLITE_OMIT_ALTERTABLE defined the parser already triggers a syntax error so it never reaches the virtual tree. >It looks like there are a few extra lines of code that could >be omitted from the build when SQLITE_OMIT_ALTERTABLE is >defined though. Agreed, but this would not save much footprint so it might not be worth the effort. I was more thinking in terms of detecting potential errors at compilation before they occur at run-time. Many thanks for looking into this, Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] rtree woes with SQLITE_OMMIT_...
On Jul 19, 2008, at 1:50 AM, Ralf Junker wrote: > I am running the rtree module against an SQLite build which has > lots of functionality SQLITE_OMIT_...ed. Can you be more specific? Exactly which SQLITE_OMIT symbols are defined? > Surprisingly, I receive strange errors like SQLITE_NOMEM for simple > statements like > > CREATE VIRTUAL TABLE t6 USING rtree(ii, x1, x2); > > or > > SELECT ii FROM t6 WHERE x1>2; > > Question: Does the rtree module rely on some SQLite functionality > which I might have omitted? > > I notice that rtree uses ALTER TABLE without checking for > SQLITE_OMIT_ALTERTABLE. Even though this is not causing me problems > right now, it might help to exclude alter table functionality from > rtree.c conditinally or issue an appropriate error when called. > > Btw, ALTER TABLE also applies to FTS3. Is this worth an extra > thread or even a ticket? Rtree uses ALTER TABLE as part of the xRename() callback. The xRename() callback is invoked when the sqlite user does an ALTER TABLE. So, the rtree code that uses ALTER TABLE will never be invoked when the module is being used by an sqlite build that does not support ALTER TABLE. I suspect the same is true of fts3. It looks like there are a few extra lines of code that could be omitted from the build when SQLITE_OMIT_ALTERTABLE is defined though. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] rtree woes with SQLITE_OMMIT_...
I am running the rtree module against an SQLite build which has lots of functionality SQLITE_OMIT_...ed. Surprisingly, I receive strange errors like SQLITE_NOMEM for simple statements like CREATE VIRTUAL TABLE t6 USING rtree(ii, x1, x2); or SELECT ii FROM t6 WHERE x1>2; Question: Does the rtree module rely on some SQLite functionality which I might have omitted? I notice that rtree uses ALTER TABLE without checking for SQLITE_OMIT_ALTERTABLE. Even though this is not causing me problems right now, it might help to exclude alter table functionality from rtree.c conditinally or issue an appropriate error when called. Btw, ALTER TABLE also applies to FTS3. Is this worth an extra thread or even a ticket? Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users