Re: [sqlite] Statement is not executing
In case people are wondering. :-D 2011/7/3 Cecil Westerhof> I am not sure if it is a SQLite problem, or a Java problem. > > While filling a table I get an error "Statement is not executing". It > happens in the following code: > System.out.printf("%d, %s, %s\n", line, citation, author); > prep.setString(1, citation); > System.out.print("After citation\n"); > > I see the first output, but not the second. After this there is a -journal > file. What could be happening here? > The problem was a Java problem. I use a preparedStatement and for one reason or another this went wrong after a little more as 2.000 inserts. I now do a new preparedStatement every 1.000 inserts. -- Cecil Westerhof ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] False negatives from RTree
Hi, Has anybody ever seen anomalous behaviour on an R*Tree. Specifically, false negatives? I'm using Spatialite 2.4.0 RC. What I end up with is a table into which I can insert new geometry, but that geometry does not get retrieved by an appropriate RTree search. Indeed, even a search which spans all of my geometry does not yield these newly inserted records. For example: select count(rowid) from idx_elec_lv_cable_geometry where xmax >= -9e30 AND xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; 17235 select (count*) from elec_lv_cable; 17241 So I'm missing 6 records there. I can't discern anything strange about the data, or my methods. I'm curious to know whether anybody has seen this kind of thing before? Thanks, Ben ps. This message is cross-posted to the Spatialite mailing list. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimal SQLite
You might want to check out various compilation options at: http://www.sqlite.org/compile.html -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Monday, July 04, 2011 7:28 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Minimal SQLite On 4 Jul 2011, at 12:07pm, trilok nuwal wrote: > I want to use SQLite for one of the application which runs on a > embedded system where we have memory limitations. > > In the SQLite we have around 180+ distinct APIs, but not all APIs we > are going to use it. > > What I want is the just core APIs. Can I build SQLite in such a way > that I can avoid all the unnecessary API implement ions in the final > library. I want to avoid all the extra APIs except the core API. SQLite is distributed as source code. It's available in two forms: either lots of individual files each with their own subject area, or as one big 'amalgamation' C file. You can download both from http://www.sqlite.org/download.html Pick one form. Download it. Compile it and check that it compiles in your compiler and runs as supplied. Remove everything you don't think you need. Compile as suits you. Fix dependencies and try again. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] False negatives from RTree
On Tue, Jul 5, 2011 at 8:55 AM, Ben Harperwrote: > Hi, > Has anybody ever seen anomalous behaviour on an R*Tree. Specifically, false > negatives? > I'm using Spatialite 2.4.0 RC. > > What I end up with is a table into which I can insert new geometry, but > that geometry does not get retrieved by an appropriate RTree search. > Indeed, even a search which spans all of my geometry does not yield these > newly inserted records. > > For example: > select count(rowid) from idx_elec_lv_cable_geometry where xmax >= -9e30 AND > xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; > 17235 > > select (count*) from elec_lv_cable; > 17241 > > So I'm missing 6 records there. > What does the following show: SELECT * FROM idx_elec_lv_cable_geometry EXCEPT SELECT * FROM idx_elec_lv_cable_geometry where xmax >= -9e30 AND xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; That query should show just the 6 records that are missing. > > I can't discern anything strange about the data, or my methods. > I'm curious to know whether anybody has seen this kind of thing before? > > Thanks, > Ben > > ps. This message is cross-posted to the Spatialite mailing list. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Very specific use of sqlite3_backup_* with main and temp tables between a real and a :memory: database
Hello, I would like more details about the functions sqlite3_backup_*. I am trying to use them in a very specific use case. I have a database with real and temporary tables. For a very specific work, I must load (for a while) the real tables only in memory because it must not affect the other users. For that, I use two sqlite3 handles. The first is on the file, the second is on a ":memory:" database. Then I copy all tables (main + temp) in the ":memory:" database. I switch the handle then the software continues as usual. After the work, I must switch on the real sqlite3 handle. But I must copy the temporary tables from :memory: in the real handle. I use sqlite3_backup_* because there are many data and it must be fast. db1 is the file "base.db" db2 is ":memory:" db 1. base.db has the real tables (main) and the temporary tables (temp) 2. I create a new database with the name ":memory:" 3. I use sqlite3_backup_* in this way : sqlite3_backup_init (db2, "main", db1, "main"); /* blabla */ sqlite3_backup_init (db2, "temp", db1, "temp"); /* blabla */ 4. I create my triggers, busy handler, etc.. on db2 (like for db1 at the beginning). 4. I work with the db2 handle instead of db1 because when the main tables are changed here it must not affect the other users. 5. When the work is done, I must return to the db1 database. But the changes in the temp tables must be kept. The I use: sqlite3_backup_init (db1, "temp", db2, "temp"); And here.. I've many very strange things.. memory corruptions but not always at the same place and in the code which is not related to sqlite... I think that the problem is only sqlite3_backup_init (db1, "temp", db2, "temp"); Because (maybe) the temporary triggers on db1 are now broken... ? I must drop all temporary things in db1 before sqlite3_backup_init() in the case where the tables already exist? And what about my queries? I must finalized them before, and re-prepare.. ? Thank you for your help and sorry for my bad english. Regards, Mathieu Schroeter ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Statement is not executing
On Tue, Jul 5, 2011 at 11:08 AM, Cecil Westerhofwrote: > The problem was a Java problem. I use a preparedStatement and for one > reason > or another this went wrong after a little more as 2.000 inserts. I now do a > new preparedStatement every 1.000 inserts. > Long Live Garbage Collection. Did you try running reset() on the statement between each insert? Maybe that would help free up some resources? Interrupting your loop every 1000 iterations is a hacky workaround which might or might not work on any given machine (maybe on my machine the threshold is 1200 or 700). i would expend the effort to look for a real solution, rather than relying on something like that (i can't sleep at night if i know my software might break at any second due to hacks like that one). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] False negatives from RTree
The statement << SELECT * FROM idx_elec_lv_cable_geometry EXCEPT SELECT * FROM idx_elec_lv_cable_geometry where xmax >= -9e30 AND xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; >> yields an empty set. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: 05 July 2011 03:20 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] False negatives from RTree On Tue, Jul 5, 2011 at 8:55 AM, Ben Harperwrote: > Hi, > Has anybody ever seen anomalous behaviour on an R*Tree. Specifically, false > negatives? > I'm using Spatialite 2.4.0 RC. > > What I end up with is a table into which I can insert new geometry, but > that geometry does not get retrieved by an appropriate RTree search. > Indeed, even a search which spans all of my geometry does not yield these > newly inserted records. > > For example: > select count(rowid) from idx_elec_lv_cable_geometry where xmax >= -9e30 AND > xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; > 17235 > > select (count*) from elec_lv_cable; > 17241 > > So I'm missing 6 records there. > What does the following show: SELECT * FROM idx_elec_lv_cable_geometry EXCEPT SELECT * FROM idx_elec_lv_cable_geometry where xmax >= -9e30 AND xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; That query should show just the 6 records that are missing. > > I can't discern anything strange about the data, or my methods. > I'm curious to know whether anybody has seen this kind of thing before? > > Thanks, > Ben > > ps. This message is cross-posted to the Spatialite mailing list. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] False negatives from RTree
I've tried stepping into the rtree code, and the right code paths all seem to get hit. Nevertheless, once the transaction completes, I open the table again, and the freshly inserted records do not appear in the idx_elec_lv_cable_geometry_rowid table. And this is especially strange, since I debug-step-over the code that performs the insertion into idx_elec_lv_cable_geometry_rowid, and it all appears to run without a hitch. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: 05 July 2011 03:20 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] False negatives from RTree On Tue, Jul 5, 2011 at 8:55 AM, Ben Harperwrote: > Hi, > Has anybody ever seen anomalous behaviour on an R*Tree. Specifically, false > negatives? > I'm using Spatialite 2.4.0 RC. > > What I end up with is a table into which I can insert new geometry, but > that geometry does not get retrieved by an appropriate RTree search. > Indeed, even a search which spans all of my geometry does not yield these > newly inserted records. > > For example: > select count(rowid) from idx_elec_lv_cable_geometry where xmax >= -9e30 AND > xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; > 17235 > > select (count*) from elec_lv_cable; > 17241 > > So I'm missing 6 records there. > What does the following show: SELECT * FROM idx_elec_lv_cable_geometry EXCEPT SELECT * FROM idx_elec_lv_cable_geometry where xmax >= -9e30 AND xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; That query should show just the 6 records that are missing. > > I can't discern anything strange about the data, or my methods. > I'm curious to know whether anybody has seen this kind of thing before? > > Thanks, > Ben > > ps. This message is cross-posted to the Spatialite mailing list. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] ANN: C#-SQLite 3.7.7.1
C#-SQLite has been updated to release 3.7.7.1 and is RC1 is now ready for use. The 7/5/2011 release features: * Updated to SQLite version 3.7.7.1 * VFS is planned for RC2 * WAL is planned for RC3 * FTS is planned for RC4 It now runs 58,187 of the tcl testharness quicktests and 273,163 of the alltest suite without error. The project is located at http://code.google.com/p/csharp-sqlite/ Enjoy, Noah Hart -- Please keep in mind the following: * C#-SQLite is an independent reimplementation of the SQLite software library * This is not an official version of SQLite * Bugs should not be reported to the SQLite.org ticket tracking system SQLite® is a registered trademark of Hipp, Wyrick & Company, In -- View this message in context: http://old.nabble.com/ANN%3A-C--SQLite-3.7.7.1-tp31999567p31999567.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Windows command-line executable for sqlite 2.x
Hi, I've been using sqlite 2.8.14 through PHP since a long time and now I'm thinking of upgrading to latest version. In order to .dump my old database files, I need command-line executable for 2.8.14 (or compatible) version of sqlite. 1. Is there an equivalent method in PHP itself? 2. If not, where can I get command-line version? I can work with Linux version but would prefer Win32 build. Thanks, Altu ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Windows command-line executable for sqlite 2.x
On Wed, Jul 6, 2011 at 12:09 AM, Altu Faltuwrote: > Hi, > > I've been using sqlite 2.8.14 through PHP since a long time and now I'm > thinking of upgrading to latest version. In order to .dump my old database > files, I need command-line executable for 2.8.14 (or compatible) version of > sqlite. > > 1. Is there an equivalent method in PHP itself? > 2. If not, where can I get command-line version? > Direct link: http://estudioweb21.com/libros/Libro%20PHP%205/Windows/sqlite-2.8.14/sqlite-2_8_14.zip Parent directory: http://estudioweb21.com/libros/Libro%20PHP%205/Windows/sqlite-2.8.14/ -- -- -- --ô¿ô-- K e V i N > > I can work with Linux version but would prefer Win32 build. > > Thanks, > Altu ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Windows command-line executable for sqlite 2.x
Cool! Thanks, Kevin!! - Altu - Original Message - From: Kevin Benson Sent: 07/06/11 10:21 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Windows command-line executable for sqlite 2.x On Wed, Jul 6, 2011 at 12:09 AM, Altu Faltuwrote: > Hi, > > I've been using sqlite 2.8.14 through PHP since a long time and now I'm > thinking of upgrading to latest version. In order to .dump my old database > files, I need command-line executable for 2.8.14 (or compatible) version of > sqlite. > > 1. Is there an equivalent method in PHP itself? > 2. If not, where can I get command-line version? > Direct link: http://estudioweb21.com/libros/Libro%20PHP%205/Windows/sqlite-2.8.14/sqlite-2_8_14.zip Parent directory: http://estudioweb21.com/libros/Libro%20PHP%205/Windows/sqlite-2.8.14/ -- -- -- --ô¿ô-- K e V i N > > I can work with Linux version but would prefer Win32 build. > > Thanks, > Altu ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users