Re: [sqlite] [PHP5-FPM/Sqlite3] PDO can create file but no more

2010-07-27 Thread Roger Binns
-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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Alexey Pechnikov
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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Alexey Pechnikov
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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Roger Binns
-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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Alexey Pechnikov
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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Alexey Pechnikov
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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Roger Binns
-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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Alexey Pechnikov
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

Re: [sqlite] Memory leak in sqlite 3.7.0

2010-07-27 Thread Richard Hipp
On Mon, Jul 26, 2010 at 11:16 AM, Andy Gibbs wrote: > 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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Roger Binns
-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

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-27 Thread Tim Romano
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

Re: [sqlite] [PHP5-FPM/Sqlite3] PDO can create file but no more

2010-07-27 Thread Gilles Ganault
On Tue, 27 Jul 2010 14:40:11 +0200, Gilles Ganault wrote: >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

[sqlite] [PHP5-FPM/Sqlite3] PDO can create file but no more

2010-07-27 Thread Gilles Ganault
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;

Re: [sqlite] VACUUM not reclaiming space

2010-07-27 Thread Jay A. Kreibich
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

Re: [sqlite] VACUUM not reclaiming space

2010-07-27 Thread Richard Hipp
On Mon, Jul 26, 2010 at 3:28 PM, Taras Glek wrote: > 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 ;

Re: [sqlite] VACUUM not reclaiming space

2010-07-27 Thread Max Vlasov
On Mon, Jul 26, 2010 at 11:28 PM, Taras Glek wrote: > 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

Re: [sqlite] Coping with database growth/fragmentation

2010-07-27 Thread Taras Glek
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

[sqlite] VACUUM not reclaiming space

2010-07-27 Thread Taras Glek
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

Re: [sqlite] using sqlitejdbc-v056 with ant build file

2010-07-27 Thread Laurent MICHEL
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

Re: [sqlite] Memory leak in sqlite 3.7.0

2010-07-27 Thread Andy Gibbs
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

[sqlite] File locks

2010-07-27 Thread Grzegorz Russek
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

2010-07-27 Thread Grzegorz Russek
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

[sqlite] In-memory SQLite and fork()

2010-07-27 Thread Daniel Heath
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] Patch to fix typos in SQLite 3.7.0 HTML documentation.

2010-07-27 Thread Martin Jenkins
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