"rumcais" <[EMAIL PROTECTED]>
26/02/2004 05:16 PM

 
        To:     <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
        cc: 
        Subject:        RE: [sqlite] multithreading


> I've make some experiments around accessing the SQLite database fom 
concurent processes at the same time
> and I find it work good when I'm using transactions every time I touch 
the database.
> When I don't, it corrupt the database file sometimes.

In sqlite,

INSERT INTO foo VALUES("bar");
INSERT INTO foo VALUES("baz");

is equivalent to

BEGIN TRANSACTION;
INSERT INTO foo VALUES("bar");
END TRANSACTION;
BEGIN TRANSACTION;
INSERT INTO foo VALUES("baz");
END TRANSACTION;

If you are getting database corruption then you are running into a very 
strange and very serious bug, or your code (not sqlite) is corrupting the 
database (in which case it is still a very serious bug, just not in sqlite 
:). I suggest you reinvestigate and report. If its reproducable it should 
be possible to track down.

Benjamin.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to