Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-12 Thread Joe Mistachkin
Caleb A. Austin wrote: > > The top file operation works, but the sqlite3_open does not... > > Wondering if I need to compile an option for SQLite to be using the > correct file io for WEC7 > What return code is coming back from sqlite3_open()? Can you enable logging via the

Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-12 Thread Caleb A. Austin
Here is what I have come up with: FILE *fp; fp = fopen("\\release\\sql\\MYFILE.txt", "a"); fprintf(fp, "%s\n ", "Hello World, Where there is will, there is a way."); fclose(fp) ; sqlite3_open(("\\release\\sql\\count.db"), ); The top file operation works, but the sqlite3_open does

Re: [sqlite] light weight write barriers

2012-10-12 Thread Nico Williams
On Fri, Oct 12, 2012 at 5:14 PM, Simon Slavin wrote: > I think I understand what you're asking for, but I see no point in being > informed about D, because I can't see anything useful a program can do if the > transaction gets marked 'complete' but D doesn't succeed.

Re: [sqlite] light weight write barriers

2012-10-12 Thread Simon Slavin
On 12 Oct 2012, at 10:23pm, Nico Williams wrote: > Here's some more examples of where delayed-D ACKs would be nice: > distributed services. These are really just a variant of my earlier > UI example, but still: a server might respond with an ACK as soon as a >

Re: [sqlite] light weight write barriers

2012-10-12 Thread Nico Williams
On Fri, Oct 12, 2012 at 4:08 PM, Simon Slavin wrote: > If all you're doing is showing something on a display that's fine. But if > that's what you're doing I see no point in distinguishing between 'success' > and 'durable'. As far as I can see your program has nothing to

Re: [sqlite] light weight write barriers

2012-10-12 Thread Simon Slavin
On 12 Oct 2012, at 10:01pm, Nico Williams wrote: > On Fri, Oct 12, 2012 at 3:53 PM, Simon Slavin wrote: >> That's an interesting idea. I have a question. Suppose your program >> received the 'success' result for a transaction and carried on to do

Re: [sqlite] interesting deadlock.

2012-10-12 Thread Jonathan Engle
Thanks for your help Dan, works like a charm (the work-around, haven't tried the new code yet). One question, usage-related. So the reason I'm all of this with the hot backup is that when certain tables are changed, we want to create a snapshot of the database. We do this by marking an

Re: [sqlite] light weight write barriers

2012-10-12 Thread Nico Williams
On Fri, Oct 12, 2012 at 3:53 PM, Simon Slavin wrote: > That's an interesting idea. I have a question. Suppose your program > received the 'success' result for a transaction and carried on to do other > transactions. Later you test to see whether the transaction is

Re: [sqlite] light weight write barriers

2012-10-12 Thread Simon Slavin
On 12 Oct 2012, at 6:00pm, Nico Williams wrote: > I do think that applications should be able to request deferred > durability *and* find out when a given transaction has indeed become > durable. > > A distinction between success and durability in the API might bleed >

Re: [sqlite] SQLite on flash (was: [PATCH 00/16] f2fs: introduce flash-friendly file system)

2012-10-12 Thread Christian Smith
On Wed, Oct 10, 2012 at 08:47:02AM -0400, Richard Hipp wrote: > [snip] > > We would also love to have guidance on alternative techniques for obtaining > memory shared across multiple processes that does not involve mmap() of > temporary files. shmget/shmat - Part of the SysV IPC primitives and

Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-12 Thread Joe Mistachkin
Caleb A. Austin wrote: > > I have tried: > > sqlite3_open("/release/sql/countries.db", ); > I'm not sure if it will make a difference; however, I think Windows CE may need backslashes, not forward slashes. -- Joe Mistachkin ___ sqlite-users

Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-12 Thread Caleb A. Austin
Thanks Joe, I have tried: sqlite3_open("/release/sql/countries.db", ); but I get a 0 bytes countries.db in the "/release/sql/" folder and then a long list of SQL errors about no access to the database. I think this is a Windows CE issue... but asking here if someone has used SQLite on

Re: [sqlite] Sqlite, Is it possible to calculate the length of the longest increasing subsequence using an UDF?

2012-10-12 Thread Igor Tandetnik
On 10/12/2012 11:23 AM, Frank Chang wrote: With the latest version of Sqlite, Is it possible to calculate the length of the longest increasing subsequence, also referred to as sortation percent, using a sqlite UDF, user defined function? Thank you. An algorithm described at

[sqlite] 5 readers, 1 writer, shared cache and read uncommitted

2012-10-12 Thread Bob Price
This is a question to ask about a particular Sqlite configuration to see if it is appropriate or how to make it better. A brief sketch of the processing need is that I have one process managing a lot of "item" data in a Sqlite db, and occasionally there is a need to walk through all items and

Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-12 Thread Joe Mistachkin
Caleb A. Austin wrote: > > Any ideas on why the database is being placed in root and not in local? > My understanding is that Windows CE does not support the concept of a current directory. Therefore, in order for a file to be created in a particular directory, the full path to the file must

Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-12 Thread Caleb A. Austin
Thanks Joe, Yes, I will look at keeping the source code clean of any edits. This was just a way to prove that it worked. I have been able to run SQLite on the WEC7 board and create tables/ inserts/ etc. So it looks like things are working correctly. I do have a few questions though. In short:

Re: [sqlite] light weight write barriers

2012-10-12 Thread Nico Williams
On Fri, Oct 12, 2012 at 2:58 AM, Dan Kennedy wrote: > On 10/11/2012 11:38 PM, Nico Williams wrote: >> There is something you can do: [...] > > SQLite WAL mode comes close to that if you run your checkpoints > in the background. [...] Right. WAL mode comes close to being a

[sqlite] Sqlite, Is it possible to calculate the length of the longest increasing subsequence using an UDF?

2012-10-12 Thread Frank Chang
With the latest version of Sqlite, Is it possible to calculate the length of the longest increasing subsequence, also referred to as sortation percent, using a sqlite UDF, user defined function? Thank you. ___ sqlite-users mailing list

Re: [sqlite] light weight write barriers

2012-10-12 Thread Pavel Ivanov
Well, an article on write barriers published in May 2007 can't contradict the statement that barriers don't exist these days. :) Pavel On Fri, Oct 12, 2012 at 5:38 AM, Black, Michael (IS) wrote: > There isn't Somebody sure wasted their time on this article then... >

Re: [sqlite] primary key with bulk insert (UNION SELECT)

2012-10-12 Thread Simon Davies
On 11 October 2012 15:07, Alan Frankel wrote: > I have a table that uses an autogenerated id as primary key. I want to do > bulk inserts using UNION SELECT, but it doesn't seem to be happy unless I > specify an id for each row: > > sqlite> create table

Re: [sqlite] light weight write barriers

2012-10-12 Thread Black, Michael (IS)
There isn't Somebody sure wasted their time on this article then... http://www.linux-magazine.com/w3/issue/78/Write_Barriers.pdf Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems

Re: [sqlite] primary key with bulk insert (UNION SELECT)

2012-10-12 Thread Simon Slavin
On 11 Oct 2012, at 3:07pm, Alan Frankel wrote: > I have a table that uses an autogenerated id as primary key. I want to do > bulk inserts using UNION SELECT, but it doesn't seem to be happy unless I > specify an id for each row: > > sqlite> create table

Re: [sqlite] System.Data.SQLite Field Name are surrounded by double quotes for Views

2012-10-12 Thread Joe Mistachkin
Vincent DARON wrote: > > It seems the IDataReader.GetName(int i) method return name surrounded by > double quotes for views. > > Example: > > For a table : "Id" > For a view : "\"Id\"" > > Is it the expected behaviour ? > Do you have some example SQL and/or C# code that demonstrates this

[sqlite] System.Data.SQLite Field Name are surrounded by double quotes for Views

2012-10-12 Thread Vincent DARON
Hi all, It seems the IDataReader.GetName(int i) method return name surrounded by double quotes for views. Example: For a table : "Id" For a view : "\"Id\"" Is it the expected behaviour ? Thanks Vincent PS: In the same way, IDataReader.GetColumnIndex() will return -1 for view column name

Re: [sqlite] light weight write barriers

2012-10-12 Thread Christoph Hellwig
On Thu, Oct 11, 2012 at 11:32:27AM -0500, ? Yang Su Li wrote: > I am not quite whether I should ask this question here, but in terms > of light weight barrier/fsync, could anyone tell me why the device > driver / OS provide the barrier interface other than some other > abstractions anyway?

[sqlite] primary key with bulk insert (UNION SELECT)

2012-10-12 Thread Alan Frankel
I have a table that uses an autogenerated id as primary key. I want to do bulk inserts using UNION SELECT, but it doesn't seem to be happy unless I specify an id for each row: sqlite> create table CelestialObject (id INTEGER PRIMARY KEY, name VARCHAR(25), distance REAL); sqlite> insert into

Re: [sqlite] Seemingly random Access violation errors

2012-10-12 Thread Joe Mistachkin
Matthew Dumbleton wrote: > > I have tried the new version you mentioned (via the ZIP archive) but this > doesn't seem to have resolved my issue. > I'm working on some more changes that might help if the issue is actually related to threads being aborted. > > I did remove the abort call

Re: [sqlite] light weight write barriers

2012-10-12 Thread Dan Kennedy
On 10/11/2012 11:38 PM, Nico Williams wrote: On Wed, Oct 10, 2012 at 12:48 PM, Richard Hipp wrote: Could you list the requirements of such a light weight barrier? i.e. what would it need to do minimally, what's different from fsync/fdatasync ? For SQLite, the write barrier