Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Simon Slavin
On 5 Jun 2013, at 8:38pm, Philip Bennefall wrote: > On 5 Jun 2013, at 8:32pm, Petite Abeille wrote: > >> write to tmpfs… read the file into byte[]… do what you meant to do… to >> reload… write byte[] do tmpfs… open db… and be merry… or

Re: [sqlite] An "unable to open database file" error that has nothing to do with opening database file

2013-06-05 Thread Warren Young
On 6/5/2013 11:25, Philip Goetz wrote: I suspect it's intercepting calls to the filesystem. Yes, the Cygwin DLL does translate POSIX paths to Windows paths internally. Then it calls the native APIs for you to give you the POSIX effect you asked for via the DLL. Part of the fun here is

Re: [sqlite] An "unable to open database file" error that has nothing to do with opening database file

2013-06-05 Thread Warren Young
On 6/4/2013 09:22, Philip Goetz wrote: Is it caused by using a 32-bit sqlite3? > How does a 32-bit app access a 5G file? According to https://www.sqlite.org/limits.html, SQLite doesn't really have a 32-bit limit. It's not trying to load all 5 GiB into RAM at once. It manipulates the DB

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Petite Abeille" To: "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 10:04 PM Subject: Re: [sqlite] Serialize an in-memory database On Jun 5, 2013, at 10:02 PM, Philip Bennefall

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Petite Abeille
On Jun 5, 2013, at 10:02 PM, Philip Bennefall wrote: > That is exactly the sort of thing I am looking for. If anything, I think it'd > be great to have such a vfs in SqLite if only for > completeness/customizability, seeing as how there are so many different > allocators

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Jay A. Kreibich" To: "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 9:55 PM Subject: Re: [sqlite] Serialize an in-memory database On Wed, Jun 05, 2013 at 09:15:21PM +0200, Petite Abeille

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Petite Abeille" To: "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 9:54 PM Subject: Re: [sqlite] Serialize an in-memory database On Jun 5, 2013, at 9:44 PM, Philip Bennefall

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Jay A. Kreibich
On Wed, Jun 05, 2013 at 09:15:21PM +0200, Petite Abeille scratched on the wall: > > On Jun 5, 2013, at 9:10 PM, Philip Bennefall wrote: > > > Yes, I have seen the backup API. But I would like to avoid the disk > > file entirely and just serialize to and from memory. > >

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Petite Abeille
On Jun 5, 2013, at 9:44 PM, Philip Bennefall wrote: > I use Windows. This looks like it is purely for Unix variants? I suspect one call these 'RAM disk/drive' as well... http://en.wikipedia.org/wiki/List_of_RAM_drive_software > I need something that operates wherever

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Petite Abeille" To: "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 9:39 PM Subject: Re: [sqlite] Serialize an in-memory database On Jun 5, 2013, at 9:38 PM, Philip Bennefall

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Petite Abeille
On Jun 5, 2013, at 9:38 PM, Philip Bennefall wrote: > I don't want it in a file, however. I want it in a memory block. So tmpfs > wouldn't do the trick from what I gather. … tmpfs *is* memory… just looks like a file system… http://en.wikipedia.org/wiki/Tmpfs

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Petite Abeille" To: "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 9:32 PM Subject: Re: [sqlite] Serialize an in-memory database On Jun 5, 2013, at 9:25 PM, Philip Bennefall

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Petite Abeille
On Jun 5, 2013, at 9:25 PM, Philip Bennefall wrote: > Doesn't that still create a file, just a temporary one? I need the serialized > content in a char* or similar so I can memcpy it etc, and then feed it back > to SqLite at a later time. I guess I could make a toy vfs

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Roman Fleysher" To: "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 9:26 PM Subject: Re: [sqlite] Serialize an in-memory database Read section on URI Filemanes, particularly

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Andreas Kupries
On Wed, Jun 5, 2013 at 12:25 PM, Philip Bennefall wrote: > - Original Message - From: "Petite Abeille" > On Jun 5, 2013, at 9:10 PM, Philip Bennefall wrote: >> Yes, I have seen the backup API. But I would like to avoid the disk file >> entirely

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Roman Fleysher
Read section on URI Filemanes, particularly mode for memory databases: http://www.sqlite.org/c3ref/open.html DB Connection in backup API does not have to point to a file, it can point to in-memory database if URIs are enabled. (I learned it from someone else on the list, i use SQLite for

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Stephan Beal
On Wed, Jun 5, 2013 at 9:25 PM, Philip Bennefall wrote: > or similar so I can memcpy it etc, and then feed it back to SqLite at a > later time. I guess I could make a toy vfs that uses a malloc:ed chunk that > pretends to be the disk drive, and backup to/from that to a

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Petite Abeille" To: "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 9:15 PM Subject: Re: [sqlite] Serialize an in-memory database On Jun 5, 2013, at 9:10 PM, Philip Bennefall

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Petite Abeille
On Jun 5, 2013, at 9:10 PM, Philip Bennefall wrote: > Yes, I have seen the backup API. But I would like to avoid the disk file > entirely and just serialize to and from memory. Lateral thinking… write your db to tmpfs… ___

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
- Original Message - From: "Andreas Kupries" To: ; "General Discussion of SQLite Database" Sent: Wednesday, June 05, 2013 9:07 PM Subject: Re: [sqlite] Serialize an in-memory database On Wed, Jun 5, 2013 at

Re: [sqlite] Serialize an in-memory database

2013-06-05 Thread Andreas Kupries
On Wed, Jun 5, 2013 at 11:55 AM, Philip Bennefall wrote: > Hello all, > > This may be a somewhat strange question, but I can't find an answer to it on > the website so I figured I would give it a shot. > > Is it possible to put the full contents of an SqLite in-memory

[sqlite] Serialize an in-memory database

2013-06-05 Thread Philip Bennefall
Hello all, This may be a somewhat strange question, but I can't find an answer to it on the website so I figured I would give it a shot. Is it possible to put the full contents of an SqLite in-memory database into a string/blob in memory? I would then like to take the same string and

Re: [sqlite] An "unable to open database file" error that has nothing to do with opening database file

2013-06-05 Thread Philip Goetz
I'm using Cygwin, a unix shell that runs under Windows. I don't know how cygwin interacts with the OS, but I have to specify cygwin-style paths rather than windows-style paths in perl to connect to the SQLite db, so I suspect it's intercepting calls to the filesystem. Using \ and * as characters

Re: [sqlite] An "unable to open database file" error that has nothing to do with opening database file

2013-06-05 Thread Stephen Chrzanowski
Good to know, however note that he's using /var/tmp which to me looks like linux, not windows. On Wed, Jun 5, 2013 at 5:41 AM, Clemens Ladisch wrote: > Stephen Chrzanowski wrote: > > I think the problem is with the \ (Note direction) as this makes the next > > character a

[sqlite] 3rd Call For Papers, 20th Annual Tcl/Tk Conference 2013

2013-06-05 Thread Andreas Kupries
[[ Notes: Abstracts and proposals are now due July 6, 2013 [+ 2 weeks] ]] 20'th Annual Tcl/Tk Conference (Tcl'2013) http://www.tcl.tk/community/tcl2013/ September 23 - 27, 2013 Bourbon Orleans Hotel New Orleans, Louisiana, USA http://www.bourbonorleans.com/ Important Dates: Abstracts and

[sqlite] SQLITE_OPEN_FULLMUTEX confusion

2013-06-05 Thread Dilip Ranganathan
I think I may have misunderstood something in a major way with regards to the subject. I have an application that maintains a single application-wide connection which is opened with SQLITE_OPEN_FULLMUTEX flag. So if I have a method that inserts multiple rows into a db, does that method need an

Re: [sqlite] Bug in SQLite 3.7.15-3.7.17 regarding group by query after joining two table with primary key index

2013-06-05 Thread Chen, Mi
Thanks very much for the prompt action! One other simple workaround, if performance is not a concern, SELECT T2.A, T2.B, T1.D, T1.E, T1.F, T1.G, T1.H, MAX(T1.C) FROM T1, T2 WHERE T1.B = T2.B AND T1.C = T2.C GROUP BY T2.A || " " || T2.B || " " || T1.D || " " || T1.E || " " || T1.F || " " ||

[sqlite] hi!

2013-06-05 Thread Leslie S Satenstein
http://seminarski-diplomski.co.rs/bing.php?kvwafvpnww862eid lsatenstein Leslie S Satenstein - What is meant by the circle and squares is

Re: [sqlite] Bug in SQLite 3.7.15-3.7.17 regarding group by query after joining two table with primary key index

2013-06-05 Thread Richard Hipp
On Tue, Jun 4, 2013 at 2:42 PM, Chen, Mi wrote: > All, I encountered a likely bug during development with latest SQL > versions (3.7.17)... It appears to be affecting the result of queries with > GROUP BY clause with partial join over two primary keys. > Your test case has

[sqlite] Bug in SQLite 3.7.15-3.7.17 regarding group by query after joining two table with primary key index

2013-06-05 Thread Chen, Mi
All, I encountered a likely bug during development with latest SQL versions (3.7.17)... It appears to be affecting the result of queries with GROUP BY clause with partial join over two primary keys. SQL Version 3.7.14 does not have this behavior, and SQL Version 3.7.15 - 3.7.17 are all

[sqlite] Change of behavior dealing with invalid views

2013-06-05 Thread Dominique Devienne
We had a latent bug about an invalid view hiding in our code, which was recently revealed when we upgraded SQLite to 3.7.16.2 (I test with 1.15.2 below, but that's the same). I guess that's good, thanks Richard :) But that brings up the question about why the create view itself does not fail?

Re: [sqlite] An "unable to open database file" error that has nothing to do with opening database file

2013-06-05 Thread Clemens Ladisch
Stephen Chrzanowski wrote: > I think the problem is with the \ (Note direction) as this makes the next > character a literal character. Only for software that interprets backslashes in this way. The Windows file name parser doesn't. Regards, Clemens

Re: [sqlite] Covering Index?

2013-06-05 Thread Hick Gunter
In your test case it would be better to have an index on (col1,col3,...) or (col3,col1,...) because SQLite could then scan only the desired rows. I assume that is what you mean by "properly ordered". Read performance is determined by how well the indexes match the select list, where

Re: [sqlite] An "unable to open database file" error that has nothing to do with opening database file

2013-06-05 Thread Stephen Chrzanowski
I think the problem is with the \ (Note direction) as this makes the next character a literal character. So it isn't trying to drop the file into a sub directory, its using a literal character e. So /var/tmp/etilqs_PIREaghry4bPE*S8\et*ilqs_02LTi9u3HO3cx0g translates to