Re: [sqlite] Multithreading problem

2011-02-03 Thread Tiberio, Sylvain
03, 2011 5:15 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multithreading problem On 02/03/2011 11:00 PM, Tiberio, Sylvain wrote: > Here the modification in sqlite3.c: > > if( unlink(zPath)==(-1)&& errno!=ENOENT ){ > perror(zPath); > ret

Re: [sqlite] Multithreading problem

2011-02-03 Thread Tiberio, Sylvain
Michael, The database try.db is created in the directory where I test this issue. In this directory I edit the source file, compile it and execute the test. - If I use SQL 3.6.22 it runs well. - I have the save issue if I put the datafile in: * Ram disk (/tmp/) * local disk * my NFS home disk -

Re: [sqlite] Multithreading problem

2011-02-03 Thread Tiberio, Sylvain
: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy Sent: Thursday, February 03, 2011 4:51 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multithreading problem On 02/03/2011 10:22 PM, Tiberio, Sylvain wrote: > > Dan, > > Thank

Re: [sqlite] Multithreading problem

2011-02-03 Thread Tiberio, Sylvain
, Tiberio, Sylvain wrote: > Hi! > > > > I have a problem when I try to create a new database in a thread and try > to add a table on it. > > > > The following C code (see in the end of this e-mail) produces: The program is working Ok with 3.7.5 here. After the IO

[sqlite] Multithreading problem

2011-02-03 Thread Tiberio, Sylvain
Hi! I have a problem when I try to create a new database in a thread and try to add a table on it. The following C code (see in the end of this e-mail) produces: in SQLite 3.7.5: Disk I/O error (same problem with 3.7.4) SQLite Treadsafe. Yes (1). SQLite Lib version... 3.7.5.

Re: [sqlite] Conditional insertion syntaxe in SQLite

2010-01-27 Thread Tiberio, Sylvain
, January 26, 2010 6:23 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Conditional insertion syntaxe in SQLite Tiberio, Sylvain <sylvain.tibe...@eads.com> wrote: > Is it possible to write something like that in SQL (for SQLite of > course!): > > If [toDeleteMin,toDel

Re: [sqlite] Conditional insertion syntaxe in SQLite

2010-01-26 Thread Tiberio, Sylvain
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Monday, January 25, 2010 5:06 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Conditional insertion syntaxe in SQLite Tiberio, Sylvain <sylvain.tibe...@eads.

[sqlite] Conditional insertion syntaxe in SQLite

2010-01-25 Thread Tiberio, Sylvain
Hi, I manage range in a database: CREATE TABLE range(level INTEGER, roomIdMin INTEGER, roomIdMax INTEGER, CHECK (roomIdMin<=roomIdMax) ); INSERT INTO range VALUES (1,100,200); INSERT INTO range VALUES (2,300,400); | level |

Re: [sqlite] Problem to trigger a FAIL on DELETE

2010-01-25 Thread Tiberio, Sylvain
Tiberio, Sylvain <sylvain.tibe...@eads.com>: > Hi, > > Here is my database: > . . . > CREATE TRIGGER range_del BEFORE DELETE ON range FOR EACH ROW >  BEGIN >    SELECT RAISE(FAIL,'Room exist in this range') >    WHERE (SELECT count(*) >             FROM room >  

[sqlite] Problem to trigger a FAIL on DELETE

2010-01-22 Thread Tiberio, Sylvain
Hi, Here is my database: CREATE TABLE room (roomIdINTEGER PRIMARY KEY, roomName TEXT); CREATE TABLE range(level INTEGER, roomIdMin INTEGER, roomIdMax INTEGER, CHECK (roomIdMin<=roomIdMax) ); CREATE TRIGGER

Re: [sqlite] Attached database

2010-01-21 Thread Tiberio, Sylvain
o use them. You can attach them in any order or do not attach them at all - doesn't make any difference for SQLite, it's just for your convenience and it can make difference in how you write your queries. Pavel On Wed, Jan 20, 2010 at 12:07 PM, Tiberio, Sylvain <sylvain.tibe...@ead

Re: [sqlite] Attached database

2010-01-20 Thread Tiberio, Sylvain
inal Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Wednesday, January 20, 2010 5:17 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Attached database Tiberio, Sylvain <sylvain.tibe...@eads.com> wrote: >

Re: [sqlite] Attached database

2010-01-20 Thread Tiberio, Sylvain
is in one piece and in full control of SQLite there always will be scenario when foreign key cannot be enforced properly. Pavel On Wed, Jan 20, 2010 at 11:07 AM, Tiberio, Sylvain <sylvain.tibe...@eads.com> wrote: > Ok, so cross-database view is not supported. Right? > > About "cro

Re: [sqlite] Attached database

2010-01-20 Thread Tiberio, Sylvain
reign keys: how do you think SQLite is supposed to enforce foreign key when other database is not attached or when you attach another database with the same alias that have table with the same name but with completely different data? Pavel On Wed, Jan 20, 2010 at 10:33 AM, Tiberio, Sylvain <

[sqlite] Attached database

2010-01-20 Thread Tiberio, Sylvain
Hi, I remark some effects if I use a main database with other attached database (ATTACH command): - I cannot create view in main database that select columns from main database and attached database. - There is no foreign key constraints control is the foreign key is on an attached database table.