Re: [sqlite] When to call VACUUM - revisited

2012-07-05 Thread _ph_
Hi Simon, I already read your previous replies, but to revisit my scenaro: - My OS is sensitive to fragmentation - We are running with auto-vacuum enabled, so the freelist_count is usually small (not a good indicator) but fragmentation supposedly gets worse -We use sqlite as application

[sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
I have an asp.net application. I open a sqlite in-memory connection with SQLiteConnection conn = new SQLiteConnection ( Data Source=:memory: ); command. I read that by using cache=shared parameter, I can make that in-memory database reachable from other connections. 1.What is the way of

Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Pavel Ivanov
On Thu, Jul 5, 2012 at 7:46 AM, T Ü shocking_blue2...@yahoo.com wrote: I have an asp.net application. I open a sqlite in-memory connection with SQLiteConnection conn = new SQLiteConnection ( Data Source=:memory: ); command. I read that by using cache=shared parameter, I can make that

Re: [sqlite] When to call VACUUM - revisited

2012-07-05 Thread Simon Slavin
On 5 Jul 2012, at 9:34am, _ph_ hauptma...@yahoo.com wrote: I already read your previous replies, but to revisit my scenaro: - My OS is sensitive to fragmentation - We are running with auto-vacuum enabled, so the freelist_count is usually small (not a good indicator) Ah. If you're always

Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
By trying I found out that SQLiteConnection(Data Source=:memory:;cache=shared); worked. In a single aspx.page at cs code, first I open an in-memory database connection         SQLiteConnection conn = new SQLiteConnection ( Data Source=:memory:;cache=shared );     conn.Open(); than create

Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Pavel Ivanov
On Thu, Jul 5, 2012 at 8:37 AM, T Ü shocking_blue2...@yahoo.com wrote: By trying I found out that SQLiteConnection(Data Source=:memory:;cache=shared); worked. In a single aspx.page at cs code, first I open an in-memory database connection SQLiteConnection conn = new SQLiteConnection (

Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
It returns 3.6.23.1 From: Pavel Ivanov paiva...@gmail.com To: T Ü shocking_blue2...@yahoo.com Cc: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Thursday, July 5, 2012 3:40 PM Subject: Re: [sqlite] Multiple connections to in-memory

Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Pavel Ivanov
So this feature shouldn't work for you. From my first message: But this possibility was introduced in SQLite 3.7.13. So your asp.net provider should be compiled with the latest version of SQLite, otherwise it won't work. Pavel On Thu, Jul 5, 2012 at 8:56 AM, T Ü shocking_blue2...@yahoo.com

Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
Thank you so much Pavel. I will try with the new version. From: Pavel Ivanov paiva...@gmail.com To: T Ü shocking_blue2...@yahoo.com Cc: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Thursday, July 5, 2012 4:03 PM Subject: Re: [sqlite]

Re: [sqlite] Strange issue with sqlite 3.7.9

2012-07-05 Thread Alan Chandler
On 05/07/12 01:05, Richard Hipp wrote: On Wed, Jul 4, 2012 at 3:05 PM, Alan Chandlera...@chandlerfamily.org.ukwrote: The commit referenced by that page: http://www.sqlite.org/src/info/b23ae131874bc5c621f0 went into 3.7.9. So the problem was probably introduced in 3.7.9, not 3.7.10.

Re: [sqlite] When to call VACUUM - revisited

2012-07-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/07/12 05:29, Simon Slavin wrote: Fragmentation of the database file on disk is something that SQLite can't control, However you can ask SQLite to do things that will mitigate fragmentation by extending the file in larger blocks. See the file

Re: [sqlite] Standalone LUA regex that can be used in sqlite

2012-07-05 Thread Jay A. Kreibich
On Wed, Jul 04, 2012 at 11:00:55AM +0200, Domingo Alvarez Duarte scratched on the wall: Hello ! I did a modification to the LUA regex code to allow using it without LUA dependency so it can be used with sqlite as regex function. Very handy! It's very light and small thus a good

Re: [sqlite] When to call VACUUM - revisited

2012-07-05 Thread Jay A. Kreibich
On Thu, Jul 05, 2012 at 01:29:18PM +0100, Simon Slavin scratched on the wall: On 5 Jul 2012, at 9:34am, _ph_ hauptma...@yahoo.com wrote: I already read your previous replies, but to revisit my scenaro: - My OS is sensitive to fragmentation - We are running with auto-vacuum enabled,

Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Jay A. Kreibich
On Thu, Jul 05, 2012 at 09:03:54AM -0400, Pavel Ivanov scratched on the wall: So this feature shouldn't work for you. From my first message: But this possibility was introduced in SQLite 3.7.13. So your asp.net provider should be compiled with the latest version of SQLite, otherwise it

Re: [sqlite] Standalone Lua regex that can be used in sqlite

2012-07-05 Thread Petite Abeille
On Jul 4, 2012, at 11:00 AM, Domingo Alvarez Duarte wrote: I did a modification to the LUA regex code to allow using it without LUA dependency so it can be used with sqlite as regex function. Well done. Lua [1] and SQLite are made for each other :) [1] http://www.lua.org/about.html#name

[sqlite] SQLite4 nit/question

2012-07-05 Thread Nico Williams
In the key encoding page you talk about encoding E as a varint, and in some cases -E as a varint, but the page on varint says they are unsigned. I assume that -E == ~E + 1 (i.e., two's complement of E), and that ~E == one's complement of E. Nico -- ___

[sqlite] Inserting from another table...

2012-07-05 Thread Sam Carleton
I am working on converting my system table from one form to another. The old form was one row per value with a category/key/value (DBLookup) , the new form is a separate column for each value (PP_VIEWER_SETTINGS). I am trying to create an insert statement to run when the new table is created,

Re: [sqlite] Inserting from another table...

2012-07-05 Thread Pavel Ivanov
The insert statement below should insert one row into table PP_VIEWER_SETTINGS. Does it do that? Is it what you called does not work? To insert several rows you need to write a huge join of dblookup to itself, so your insert statement should look like this: insert into PP_VIEWER_SETTINGS (...)

[sqlite] seeking working PDO-Sqlite with php form example

2012-07-05 Thread D A
Can anybody explain to me how to set up my sqlite database file with my Linux server? To my limited knowledge, i have uploaded the following files in a directory on my server: 1. sqlite.db 2. form.php Do i have to also upload the command shell?? I am confident in the php and sqlite code and

[sqlite] wrong expression

2012-07-05 Thread
In file os_win.c in line 2052 must be: if( locktype==PENDING_LOCK res ){ instead of: if( locktype==EXCLUSIVE_LOCK res ){ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Database sharing across processes

2012-07-05 Thread Jonathan Haws
I am fairly new to database development and I am working on an embedded system where we are utilizing SQLite to manage some files and other information that is being shared between processes. What I am doing is I have the SQLite amalgamation source code that I am compiling into each binary

[sqlite] Bug regarding HAVING aggregation and typecast comparisons

2012-07-05 Thread Benjamin Feng
sqlite CREATE TABLE test_base(id INTEGER NOT NULL PRIMARY KEY); sqlite CREATE TABLE test_join(id INTEGER NOT NULL PRIMARY KEY, base_id INTEGER NOT NULL REFERENCES test_base(id), value NUMERIC NOT NULL); sqlite INSERT INTO test_base VALUES(1); sqlite INSERT INTO test_join VALUES(1, 1, 0); sqlite

Re: [sqlite] Database sharing across processes

2012-07-05 Thread Pavel Ivanov
On Thu, Jul 5, 2012 at 10:54 AM, Jonathan Haws jonathan.h...@sdl.usu.edu wrote: I am fairly new to database development and I am working on an embedded system where we are utilizing SQLite to manage some files and other information that is being shared between processes. What I am doing is I

Re: [sqlite] Bug regarding HAVING aggregation and typecast comparisons

2012-07-05 Thread Pavel Ivanov
sqlite SELECT test_base.id, SUM(test_join.value) FROM test_base LEFT JOIN test_join ON test_join.base_id = test_base.id GROUP BY test_base.id HAVING SUM(test_join.value)='0'; sqlite The last statement generates no results. There is no mention of a special case for HAVING so I would assume

Re: [sqlite] SQLite4 nit/question

2012-07-05 Thread Richard Hipp
On Thu, Jul 5, 2012 at 7:23 PM, Nico Williams n...@cryptonector.com wrote: In the key encoding page you talk about encoding E as a varint, and in some cases -E as a varint, but the page on varint says they are unsigned. I assume that -E == ~E + 1 (i.e., two's complement of E), and that ~E ==

Re: [sqlite] wrong expression

2012-07-05 Thread Richard Hipp
On Thu, Jul 5, 2012 at 3:06 AM, mc...@ukr.net wrote: In file os_win.c in line 2052 must be: if( locktype==PENDING_LOCK res ){ instead of: if( locktype==EXCLUSIVE_LOCK res ){ No. Code is correct as written. The SQLite core never actually requests a PENDING lock. PENDING is only an