Re: [sqlite] [PHP5-FPM/Sqlite3] PDO can create file but no more
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/27/2010 05:48 AM, Gilles Ganault wrote: > Found it: For newbies like me... "table" is a reserved name so cannot > be used as a name to table: You can if you quote it. Note use double quotes to quote table & column names, single quotes for strings. You can also quote names using square brackets - eg [table name]. create table "table"(...) Heck SQLite even lets you create tables and columns with zero length names. This works: create table ""("" ""); Obviously I wouldn't recommend doing that, nor using reserved names :-) Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxPxoEACgkQmOOfHg372QSzjQCggSYL4xSQVUG83Cfz7N1XFCnc absAoKipjx0W6L6w4TIhXM9KWmhFRgn6 =u0Bs -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA database_list: insert into table?
2010/7/28 Roger Binns> If they don't allow you to turn on extension loading then only core changes > to SQLite will (eventually) get through, or the development environment > getting friendlier or the user deciding to use a different environment that > isn't so restrictive and unwilling to change. SQLite can be linked statically, isn't it? I think the extensions repository is needed but the core SQLite code may be as compact as possible. There are a lot of code patterns in SQLite source tree which may be packed as extensions (intarray SQLite3 extension for Tcl, as example. I use it as helpful extension but in upstream sources this is test only code. And md5 extension can be easy builded from upstream test code). -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA database_list: insert into table?
Yes, pragma table_info on a non-existent table is good example. I think we can only return NULL and don't create the table in this case: sqlite> .load ./libsqlitepragmacols.so sqlite> select pragma_cols('pragma table_info(sqlite_master2)')=''; sqlite> select pragma_cols('pragma table_info(sqlite_master2)') IS NULL; 1 sqlite> select pragma_cols('pragma table_info(sqlite_master)'); cid, name, type, notnull, dflt_value, pk, readonly, enforced Note: my SQLite build has additional fields "readonly" and "enforced". Updated pragmacols.c include this lines: rc = sqlite3_prepare_v2(db, (char*)sqlite3_value_text(argv[0]), -1, , NULL); if (rc != SQLITE_OK) { sqlite3_result_error_code(context, rc); return; } str = sqlite3_mprintf("%s", sqlite3_column_name(stmt,0)); for (i=1;i
Re: [sqlite] PRAGMA database_list: insert into table?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/27/2010 01:52 PM, Alexey Pechnikov wrote: > Why difficulty? I meant supporting any possible pragma, without having to hard code a list of column names for each one. Implementing your approach and using virtual tables both require knowing the column names. Example usages: select pragma_to_table("pragma something or other", "temp.foo"); select * from temp.foo; or create virtual table pragma_something("pragma something or other"); select * from pragma_something; I think it is sufficient to call prepare on the pragma and then column_name on the prepared statement, but don't know what happens when there are no results (eg pragma table_info on a non-existent table). > It's more simple than to discuss about :-) The underlying issue was not really about the difficulty of making pragmas behave more like selects (easy to solve), but rather using hostile development environments that statically wrap up SQLite inside, don't provide a reasonably complete access to SQLite APIs, and won't update their wrapping to do so. If they don't allow you to turn on extension loading then only core changes to SQLite will (eventually) get through, or the development environment getting friendlier or the user deciding to use a different environment that isn't so restrictive and unwilling to change. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxPWRUACgkQmOOfHg372QQ1dQCgiChbyJpBkcUoe3hXIY3H9aEf AjUAoNyROutO6tG9B3gDpJ8NaWEPlvOM =roCg -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA database_list: insert into table?
I'm sorry, see right link for added file pragmacols.c: http://sqlite.mobigroup.ru/artifact?name=1ef363e38a2fef3ed64a6659079264524d6bc0e0 -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA database_list: insert into table?
2010/7/27 Roger Binns> I had also considered doing one. The approach I would have taken is using > virtual tables where you could supply the pragma statement as the first > parameter to the table. The difficulty is in knowing what column names > should be returned as I really don't want to hard code them. > > Why difficulty? I did add example: http://sqlite.mobigroup.ru/artifact/373384470e6b2e00fc503e674def057986ae00b4 .load ./libsqlitepragmacols.so select pragma_cols('pragma database_list'); seq, name, file I note you ended up hard coding column names and "polluting" both the > temporary database and function list :-) > It's more simple than to discuss about :-) > I'd be a little nervous about using SQLITE_STATIC instead of > SQLITE_TRANSIENT. You are right, thanks. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA database_list: insert into table?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/27/2010 11:36 AM, Alexey Pechnikov wrote: > I did write pragmawrapper extension I had also considered doing one. The approach I would have taken is using virtual tables where you could supply the pragma statement as the first parameter to the table. The difficulty is in knowing what column names should be returned as I really don't want to hard code them. I note you ended up hard coding column names and "polluting" both the temporary database and function list :-) I'd be a little nervous about using SQLITE_STATIC instead of SQLITE_TRANSIENT. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxPNpYACgkQmOOfHg372QTLPACgxIszUgLbLPx7/lhMKrr9lMiM QQEAn2AlPxXtYs0+Yk2NX7xRrA/8iedx =lRW6 -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA database_list: insert into table?
I did write pragmawrapper extension because there are a lot of traffic in this topic. It's terrible to read these messages ;-) See http://sqlite.mobigroup.ru/dir?name=ext/_pragmawrapper Compile as gcc -shared pragmawrapper.c -o libsqlitepragmawrapper.so Use as .load ./libsqlitepragmawrapper.so select database_list(); select * from temp.database_list; Of cource you can add other pragmas similar to pragma database list. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Memory leak in sqlite 3.7.0
On Mon, Jul 26, 2010 at 11:16 AM, Andy Gibbswrote: > On Monday, July 26, 2010 4:44 PM, Richard Hipp wrote: > > > What do you get when you run: >> >> ./testfixture test/permutations.test journaltest test/memsubsys2.test >> ./testfixture test/permutations.test inmemory_journal >> test/memsubsys2.test >> >> > Please find the log files attached as journaltest.log and > inmemory_journal.log respectively. Both passed fine with no errors. > > However, I have also attached journaltest2.log which I think does > demonstrate the memory leak. Having trawled through the full log file, it > seems that the memory leak is coming from the FTS3 tests, so the > journaltest2.log file is the output from: > > ./testfixture test/permutations.test journaltest fts3cov.test > fts3malloc.test memsubsys2.test > > I tried a similar run with inmemory_journal instead of journaltest, but > this gave me a "database disk image is malformed" error (see > inmemory_journal2.log), but this is not an error I received when running the > full test suite, so it is probably because I'm running a test sequence that > I shouldn't. Correct. fts3cov.test is not compatible with inmemory_journal. > > > Here also is the configuration used for building sqlite: > > configure CFLAGS="-DSQLITE_DEFAULT_FILE_FORMAT=4 > -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS > -DSQLITE_ENABLE_STAT2 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT" > --enable-threadsafe --enable-debug --with-tcl=/usr/lib/tcl8.5 > > (The only change between the source I have here and the "official" source > is the fix mentioned in another of my emails today regarding 'configure' > finding the wrong tclsh). > > I hope this helps! Let me know if you'd like me to run further tests for > you. > > Andy > > ___ > 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
Re: [sqlite] PRAGMA database_list: insert into table?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/27/2010 07:07 AM, Tim Romano wrote: > I will consider it progress if we could get beyond the two stock replies: > "you should do that in your application" and "you could do that in an > extension". You seem to think I am sort of gatekeeper of what goes into SQLite. I am not. However I do try help - ie try to discern your goals and show how they can best be met given the architecture of SQLite and how the development team is most likely to behave. Please feel free to ignore me. Also note: 1: There was no great outpouring of consensus that SQLite should be changed 2: The SQLite dev team have not responded at all Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxPBQAACgkQmOOfHg372QTUSACeM5kPZRxHWONCXpP22EbXp7b0 TDMAoNaEY+9HIohMvf2XIUwC5EucxYdt =1BbC -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA database_list: insert into table?
Roger, I do not expect my request to be a priority. I have suggested only that such black-box amalgamations be kept in mind as a mitigating factor when the architects are assigning a priority to a feature request. In those cases where it is impossible for the end-user to avail himself of the load_extension capabilities of SQLite, the core may be the only place to implement a desired feature. The function I asked for (raw/naive codepoint-by-codepoint string reverse) does exist in other mainstream databases, including Oracle and SQLServer. I will consider it progress if we could get beyond the two stock replies: "you should do that in your application" and "you could do that in an extension". Regards Tim Romano Swarthmore PA On Mon, Jul 26, 2010 at 6:37 PM, Roger Binnswrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 07/26/2010 12:17 PM, Tim Romano wrote: > > But Roger, the "layer sitting in front of SQLite" is a programming > > environment which provides its own (black-box) connectivity to SQLite, > and > > it isn't going to be calling any DLL into which one will have injected a > UDF > > library in the manner you have laid out, and it's not going to let the > > developer load an extension either. That's what I've been trying to > make > > clear. > > You keep missing what I am saying :-) > > This is only an issue if the layer includes SQLite as an amalgamation > statically in which case it is a black box as you described.(*) > > If that layer uses SQLite as a DLL then you load the same SQLite DLL > first, tell it call the callback of your choice on connections being > opened, and then when the layer uses SQLite (which will be the same DLL) > and opens a connection, your callback is called. > > (*) If your problem is now that you have chosen to use some sort of > access layer, and that layer has chosen to hide SQLite internally, and > they haven't provided access to some SQLite functionality, and they > won't if you ask them to, then expecting this to be a priority to the > SQLite team is rather strange. > > Roger > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkxODhwACgkQmOOfHg372QStjwCfdBiKhnNrcpMHCqcWPJI3DzSu > ejUAoL2PmX3pJ8/1c/RH8zYXRfq1pZyA > =T6Bb > -END PGP SIGNATURE- > ___ > 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] [PHP5-FPM/Sqlite3] PDO can create file but no more
On Tue, 27 Jul 2010 14:40:11 +0200, Gilles Ganaultwrote: >I'm having a problem with this PHP5 script running under Nginx + >PHP5-FPM and PDO-SQLite3 Found it: For newbies like me... "table" is a reserved name so cannot be used as a name to table: #BAD $dbh->exec("CREATE TABLE IF NOT EXISTS table (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255))"); #BAD $dbh->exec("INSERT INTO table (name) VALUES ('dummy')"); $dbh->exec("CREATE TABLE IF NOT EXISTS mytable (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255))"); $dbh->exec("INSERT INTO mytable (name) VALUES ('dummy')"); HTH, ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] [PHP5-FPM/Sqlite3] PDO can create file but no more
Hello I'm having a problem with this PHP5 script running under Nginx + PHP5-FPM and PDO-SQLite3: = exec("CREATE TABLE IF NOT EXISTS table (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255))"); $dbh->exec("INSERT INTO table (name) VALUES ('dummy')"); $dbh = null; } catch(PDOException $e) { echo $e->getMessage(); } ?> = The script successfully creates the database file... but it remains empty, with no error message reported. FWIW, Nginx spawns child processes (threads?) as www-data, PHP5-FPM does the same, and the www directory is owned by www-data: = # ps aux | grep -i -e nginx -e php5 | grep -v grep root nginx: master process /usr/sbin/nginx www-data nginx: worker process root /usr/bin/php5-fpm --fpm-config /etc/php5/fpm/php5-fpm.conf www-data /usr/bin/php5-fpm --fpm-config /etc/php5/fpm/php5-fpm.conf = # ll /var/www/nginx-default/ drwxr-xr-x 6 www-data www-data 4096 2010-07-27 14:24 ./ drwxr-xr-x 3 root root 4096 2010-07-27 13:00 ../ -rw-r--r-- 1 www-data www-data0 2010-07-27 14:21 dummy.sqlite -rw-r--r-- 1 www-data www-data 565 2010-07-27 14:24 sqlite3_pdo_test.php = Thank you for any hint. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] VACUUM not reclaiming space
On Mon, Jul 26, 2010 at 12:28:42PM -0700, Taras Glek scratched on the wall: > Hi, > I noticed an interesting disk-space behavior with VACUUM. If I vacuum my > places.sqlite(Firefox database), it's 49mb. If then copy my 2 biggest > tables with > CREATE table2 as select * from orig_table; drop table ; alter table2 > rename to table; > > Then vacuum, the db becomes 24mb. The same behavior occurs if I use the > create statement from sqlite_master to setup the copy-table. > > Is this a bug or expected behavior? If the first table had any indexes, it would be expected behavior. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] VACUUM not reclaiming space
On Mon, Jul 26, 2010 at 3:28 PM, Taras Glekwrote: > Hi, > I noticed an interesting disk-space behavior with VACUUM. If I vacuum my > places.sqlite(Firefox database), it's 49mb. If then copy my 2 biggest > tables with > CREATE table2 as select * from orig_table; drop table ; alter table2 > rename to table; > > Then vacuum, the db becomes 24mb. The same behavior occurs if I use the > create statement from sqlite_master to setup the copy-table. > > Is this a bug or expected behavior? > My guess is that orig_table contained indices. You copy table does not copy the indices, but your drop table does delete them. > > Thanks, > Taras > ___ > 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
Re: [sqlite] VACUUM not reclaiming space
On Mon, Jul 26, 2010 at 11:28 PM, Taras Glekwrote: > Hi, > I noticed an interesting disk-space behavior with VACUUM. If I vacuum my > places.sqlite(Firefox database), it's 49mb. ... > ... > Then vacuum, the db becomes 24mb. > Taras, 49 almost equal to 24*2. Can it be related to some encoding conversion, like UTF16 in first case and UTF-8 in the other? Max ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Coping with database growth/fragmentation
On 07/23/2010 04:38 AM, Martin Engelschalk wrote: >Hello Taras, List, > > I have been fighting the same problems described here for a long time, > and have no real elegant solution. So, the proposed solution of the OP > below would be ideal for me too. > The proposed pragma could also define a number of pages to be allocated > at once instead of a number of bytes. > > In my case, the database grows continously and the file is often > extremely fragmented when the growth phase is finished (this concerns > the file on the disk, not internal fragmentation) > > Currently, i monitor the size of the database using pragma > freelist_count. When I see the value of free pages approach zero, i > create a dummy table with a blob field and fill it with a very large > empty blob. Then i drop the table. The empty pages remain behind and > page_count does not rise any more for a time. > This has been proposed to me on this list a while ago. > > However, testing the database in this way and creating and dropping the > table carries a performance penalty, and finding the strategic places in > my application to do this has been difficult. Yeah sounds like the same problem. Interesting workaround. Here is my "fix". https://bugzilla.mozilla.org/show_bug.cgi?id=581606 This dramatically reduces fragmentation for append-only workloads. Taras ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] VACUUM not reclaiming space
Hi, I noticed an interesting disk-space behavior with VACUUM. If I vacuum my places.sqlite(Firefox database), it's 49mb. If then copy my 2 biggest tables with CREATE table2 as select * from orig_table; drop table ; alter table2 rename to table; Then vacuum, the db becomes 24mb. The same behavior occurs if I use the create statement from sqlite_master to setup the copy-table. Is this a bug or expected behavior? Thanks, Taras ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] using sqlitejdbc-v056 with ant build file
Dear Kyle; I'm starting to use the XERIAL driver (derivated from the ZENTUS one). http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC http://groups.google.com/group/xerial?hl=en=1 I'm choosing it because it supports the extension load (http://groups.google.com/group/xerial/browse_thread/thread/a242effa31d216fd#) Regards LM kyle.kimber...@thomsonreuters.com a écrit : > Thank you for helping me get this information. > > Kyle Kimberley > Software Engineer > 919-474-6041 > > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov > Sent: Monday, July 26, 2010 1:02 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] using sqlitejdbc-v056 with ant build file > > http://lmgtfy.com/?q=sqlitejdbc-v056=1 > > It looks like official site of the driver with the link to appropriate > mailing list. > > > Pavel > > On Mon, Jul 26, 2010 at 12:56 PM,wrote: >> Thanks for the clarification. Do you know who the author of the jdbc driver >> is? >> >> Kyle Kimberley >> Software Engineer >> 919-474-6041 >> >> >> -Original Message- >> From: sqlite-users-boun...@sqlite.org >> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov >> Sent: Monday, July 26, 2010 12:38 PM >> To: General Discussion of SQLite Database >> Subject: Re: [sqlite] using sqlitejdbc-v056 with ant build file >> >>> I'll ask directly to SQLite support and see if I can get an answer. >> I hope you meant SQLite JDBC support, because SQLite support itself is >> here. And we can't tell anything about JDBC implementation unless its >> author is reading this. >> >> >> Pavel >> >> On Mon, Jul 26, 2010 at 12:22 PM, wrote: >>> Hi Pavel, >>> >>> I'm thinking the same thing - probably some kind of defect or, at this >>> version, the driver doesn't implement not returning a recordset. I'll ask >>> directly to SQLite support and see if I can get an answer. >>> >>> Thanks >>> >>> Kyle Kimberley >>> >>> -Original Message- >>> From: sqlite-users-boun...@sqlite.org >>> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov >>> Sent: Monday, July 26, 2010 12:00 PM >>> To: General Discussion of SQLite Database >>> Subject: Re: [sqlite] using sqlitejdbc-v056 with ant build file >>> I'd still like to know what I can pass to the jdbc driver to make it know I don't expect a recordset. I haven't found any information on this. Since >>> According to documentation on Ant's sql task you don't have to show it >>> explicitly whether you expect recordset to be returned or not. So >>> apparently there's some problem in communication between Ant and >>> SQLite JDBC driver, probably incorrect implementation of JDBC driver >>> in some rarely used method. I'd suggest to ask about that JDBC driver >>> developers if they are available. >>> >>> >>> Pavel >>> >>> On Mon, Jul 26, 2010 at 11:55 AM, >>> wrote: Hi Swithum, Ant is talking directly to the jdbc driver. I figured out how to make the ant exec task work for me. I'd still like to know what I can pass to the jdbc driver to make it know I don't expect a recordset. I haven't found any information on this. Since none of the statements are SELECT statements, maybe the exec task is the only solution. Thanks for your reply. Kyle Kimberley -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Swithun Crowe Sent: Monday, July 26, 2010 11:49 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] using sqlitejdbc-v056 with ant build file Hello > When I run a script, using sqlitejdbc-v056, with DROP, CREATE, and > INSERT statements I get this error message "java.sql.SQLException: no > ResultSet available". The statement actually is successful as the data > does appear in the database. It will be something to do with these statements not being queries. I don't know how you are calling these statements, but often there are two different methods/functions: - an exec function which doesn't expect a result set to be returned (DELETE, INSERT, UPDATE etc.) - a query function which does expect a result set (SELECT) It looks like the statement is being called with a query type function or method, where as the exec type one would be more suited to the statements you are calling. Maybe that will help, maybe not. Is ant talking directly to sqlite-jdbc, or is there some of your Java code in between (which you could modify)? Swithun. ___ sqlite-users mailing list sqlite-users@sqlite.org
Re: [sqlite] Memory leak in sqlite 3.7.0
On Monday, July 26, 2010 4:44 PM, Richard Hipp wrote: What do you get when you run: ./testfixture test/permutations.test journaltest test/memsubsys2.test ./testfixture test/permutations.test inmemory_journal test/memsubsys2.test Please find the log files attached as journaltest.log and inmemory_journal.log respectively. Both passed fine with no errors. However, I have also attached journaltest2.log which I think does demonstrate the memory leak. Having trawled through the full log file, it seems that the memory leak is coming from the FTS3 tests, so the journaltest2.log file is the output from: ./testfixture test/permutations.test journaltest fts3cov.test fts3malloc.test memsubsys2.test I tried a similar run with inmemory_journal instead of journaltest, but this gave me a "database disk image is malformed" error (see inmemory_journal2.log), but this is not an error I received when running the full test suite, so it is probably because I'm running a test sequence that I shouldn't. Here also is the configuration used for building sqlite: configure CFLAGS="-DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_STAT2 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT" --enable-threadsafe --enable-debug --with-tcl=/usr/lib/tcl8.5 (The only change between the source I have here and the "official" source is the fix mentioned in another of my emails today regarding 'configure' finding the wrong tclsh). I hope this helps! Let me know if you'd like me to run further tests for you. Andy ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] File locks
Hi, File locking/unlocking using LockFileEx/UnlockFileEx is also not supported under windows mobile platform. Cheers ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] LOCKFILE_EXCLUSIVE_LOCK
Hi, Compiling SQLite 3.7.0 under eVC4 fails due to undefined symbol: LOCKFILE_EXCLUSIVE_LOCK. Windows Mobile and Windows CE headers doesn't have definition of such symbol. Cheers ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] In-memory SQLite and fork()
Hi All, I've been using sqlite to run my applications tests; it's small and light and all is well. Lately I have been trying to improve the concurrency of these tests. The most obvious approach is to setup my in-memory database (using the ':memory:' location), then call fork() for each test. The sqlite docs warn against carrying a database through a fork call, but this appears to be because of how file locks work with fork (ie, irrelevant to :memory: databases). I gave it a try as described above (setup db, then fork) but the database appears to be completely empty. Anyone got any thoughts as to why this might be? - Daniel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Patch to fix typos in SQLite 3.7.0 HTML documentation.
Hi, I've attached a patch which fixes a fairly large number of typos in the current HTML documentation, where current means http://www.sqlite.org/sqlite_docs_3_7_0.zip as of 14:40 today. > mar...@ubuntu:~/Downloads$ ls -l sqlite_docs_3_7_0.zip > -rw-r--r-- 1 martin martin 2919734 2010-07-25 14:40 sqlite_docs_3_7_0.zip I haven't changed US spellings to UK spellings (eg "canceled" would be "cancelled" here) but I have tried to change things in the other direction where UK and US versions of a word existed. I haven't tried to fix up hyphenation ("reenable", "reengineer" etc) as I suspect those agree with US preferences even if they don't accord with UK preferences. I tested the patch ("patch < sqlite-3.7.0-docs.patch") and it does successfully apply the changes. The process I used was: 1. Download and unzip sqlite_docs_3_7_0.zip 2. Check the files into a Mercurial repository 3. Run "html2text *.html | enchant -l | sort -u > errs1.txt" 4. Go through the files and correct the typos 5. Check the files into a Mercurial repository 6. Produce a patch with Mercurial 7. Test the patch 8. Submit the patch I hope you find this patch useful and, assuming that you do, I hereby state that: "The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law. " Regards, Martin Jenkins ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users