[sqlite] lemon problem with two versions of lempar.c

2015-04-16 Thread Neo Anderson
I am utilizing lemon in one of my Apple Store Apps. My parser works fine with the 'old' lempar.c found in source tree TRUNK/tool/.I also found a newer version in TRUNK/src, but when I compile myparser.c generated using this lempar.c, I got compilation errors:test.c:376:7: error: use of

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Neo Anderson
if you do a execute and then start >> stepping and getting values while another thread starts another >> statement... that's 3 individual locks, but it doesn't lock the >> context of the statement being used... it will lead to bizarre crashes >> in the database; similar to double-re

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Neo Anderson
; released. > > On Sun, Feb 8, 2015 at 3:00 AM, Dan Kennedy <danielk1...@gmail.com> wrote: > >> On 02/08/2015 04:30 PM, Neo Anderson wrote: >> >>> The doc says: >>> >>> Multi-thread. >>> In this mode, SQLite can be safely used by

[sqlite] Multi-thread mode question

2015-02-08 Thread Neo Anderson
The doc says: Multi-thread. In this mode, SQLite can be safely used by multiple threads provided that no single database connection is used simultaneously in two or more threads. I have a scenario that every sqlite3_calls around a single database connection is protected by a recursive mutex,

Re: [sqlite] Error: database disk image is malformed

2015-01-05 Thread Neo Anderson
> Are you using the same sqlite3 binary for both operations? > > If a database has a table definition that an older version of SQLite does not > understand, it will sometimes give this error. If you’re using a newer > version of SQLite to dump/load the files, there will be no error. > Yes, I am

[sqlite] Error: database disk image is malformed

2015-01-05 Thread Neo Anderson
I have a customer database which appears corrupt. When I run sqlite3 mydb and PRAGMA integrity_check I got (literally, no other lines): Error: database disk image is malformed However, I can .dump and .read to create a new database. The new database works fine and the most surprising result is

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
Understood. Thanks! > From: d...@sqlite.org > Date: Thu, 4 Sep 2014 11:42:52 -0400 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] SQLITE_THREADSAFE question > > On Thu, Sep 4, 2014 at 11:32 AM, Neo Anderson <neo_in_mat...@msn

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
AFE question > > On Thu, Sep 4, 2014 at 10:14 AM, Neo Anderson <neo_in_mat...@msn.com> wrote: > >> >> 2. Fuctions that do not use sqlite3* and sqite3_stmt* such as >> sqlite3_mprintf do not need mutex protection. >> > > No. sqlite3_mprintf() does

Re: [sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
. > From: d...@sqlite.org > Date: Thu, 4 Sep 2014 10:07:02 -0400 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] SQLITE_THREADSAFE question > > On Thu, Sep 4, 2014 at 9:59 AM, Neo Anderson <neo_in_mat...@msn.com> wrote: > >&

[sqlite] SQLITE_THREADSAFE question

2014-09-04 Thread Neo Anderson
I'm building a custom library wrapper for Cocoa. I want to handle database threading issue myself. >From http://sqlite.org/compile.html#threadsafe: [quote] When compiled with SQLITE_THREADSAFE=2, SQLite can be used in a multithreaded program so long as no two threads attempt to use the same 

[sqlite] Who can explain the xCodec API?

2013-05-07 Thread Neo Anderson
I'm trying to implement a encryption VFS, but it turned out it's too tedious and error prone. The main cause is that my simple VFS does not handle locking well (or not at all). This leads to database file corruption when inserting thousands of records (I believe). Then I turned to the

Re: [sqlite] demovfs question

2013-03-20 Thread Neo Anderson
Thanks. > From: d...@sqlite.org > Date: Wed, 20 Mar 2013 12:48:45 -0400 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] demovfs question > > On Wed, Mar 20, 2013 at 12:45 PM, Neo Anderson <neo_in_mat...@msn.com>wrote: > &

Re: [sqlite] demovfs question

2013-03-20 Thread Neo Anderson
of integer field and now power is down. Can sqlite handle this? > From: slav...@bigfraud.org > Date: Wed, 20 Mar 2013 14:02:53 + > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] demovfs question > > > On 20 Mar 2013, at 10:17am, Neo

Re: [sqlite] demovfs question

2013-03-20 Thread Neo Anderson
; On 03/20/2013 05:00 PM, Neo Anderson wrote: > > I'm studying the demovfs listed on http://www.sqlite.org/vfs.html. > > > > I've got a few questions: > > > > 1. By reading the comments, it seems that file read/write operations > > must be buffered if it is

[sqlite] demovfs question

2013-03-20 Thread Neo Anderson
I'm studying the demovfs listed on http://www.sqlite.org/vfs.html. I've got a few questions: 1. By reading the comments, it seems that file read/write operations must be buffered if it is a journal file. Is this required by sqlite design? 2. The demo uses nonbuffered open/read/write function

[sqlite] SQLITE_OPEN_MAIN_JOURNAL question

2013-03-17 Thread Neo Anderson
I'm trying to implement a VFS with encryption. I cannot find any detailed documentation about some flags listed on http://www.sqlite.org/c3ref/vfs.html.  For example: SQLITE_OPEN_MAIN_JOURNAL SQLITE_OPEN_MASTER_JOURNAL SQLITE_OPEN_SUBJOURNAL There is a minimal mention of these flags in source

Re: [sqlite] Command history not working in sqlite3 tool for MAC OS

2012-05-11 Thread Neo Anderson
6.12) and up arrow returns > last command as expected. Did you install 3.7.11 your self, if so I wonder > if you missed a component (e.g. one which provides the cmd line > functionality). > > On Fri, May 11, 2012 at 6:33 AM, Neo Anderson <neo_in_mat...@msn.com> wrote: >

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
qlite.org > Subject: Re: [sqlite] Handle multiple results using sqlite3_step > > > On Mar 25, 2012, at 9:36 PM, Neo Anderson wrote: > > > And I do not want to use big union. > > Out of curiosity, why is that? SQLite goes to great length to support >

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
I think it's actually not practical to do this. > To: sqlite-users@sqlite.org > From: itandet...@mvps.org > Date: Sun, 25 Mar 2012 08:42:11 -0400 > Subject: Re: [sqlite] Handle multiple results using sqlite3_step > > Neo Anderson <neo_in_mat...@msn.com> wrote: >

[sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
Is it possible to handle multiple results using sqlite3_step or any other API calls? I want to execute the following SQL in one statement and want to get the two resultsets. select 1 a; select 2 b; ___

[sqlite] Possible bug? Primary key not created for CREATE TABLE(id INTEGER primary key);

2012-03-25 Thread Neo Anderson
See the following result: sqlite> select * from sqlite_master order by type; type|name|tbl_name|rootpage|sql index|sqlite_autoindex_t_1|t|4| index|sqlite_autoindex_t3_1|t3|7| table|t|t|2|CREATE TABLE t(id int primary key, key, value) table|t2|t2|5|CREATE TABLE t2(id INTEGER primary key, key,