Re: [sqlite] Multithreading problem

2011-02-04 Thread Dan Kennedy
On 02/04/2011 01:04 AM, Tiberio, Sylvain wrote: > You're right! > > I checked the Solaris documentation the correct flag to compile > multithread program is -D_REENTRANT. > > I have reconfigured and remade sqlite libs: >./configure --enable-threadsafe CFLAGS=-D_REENTRANT >make > > I have

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 Dan Kennedy
..@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, >> >> Thanks for your attention. >&

Re: [sqlite] Multithreading problem

2011-02-03 Thread Tiberio, Sylvain
al Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS) Sent: Thursday, February 03, 2011 4:34 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Multithreading problem Can you "su" as the owner you are ar

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 Dan Kennedy
lite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy > Sent: Thursday, February 03, 2011 3:16 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Multithreading problem > > On 02/02/2011 09:31 PM, Tiberio, Sylvain wrote: >> Hi! >> >> >> >> I have

Re: [sqlite] Multithreading problem

2011-02-03 Thread Black, Michael (IS)
sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Tiberio, Sylvain [sylvain.tibe...@cassidian.com] Sent: Thursday, February 03, 2011 9:22 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] Multithreading problem Dan, Thanks for your attention. sqlite3_extended_errcod

Re: [sqlite] Multithreading problem

2011-02-03 Thread Tiberio, Sylvain
and a null size. Regards, Sylvain -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy Sent: Thursday, February 03, 2011 3:16 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multithreading problem On 02/02/2011 09:31 PM

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
On 02/02/2011 09:31 PM, 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 error in

[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] Multithreading support approach

2010-07-02 Thread Cargnelutti, Pablo Fernando
Thanks Greg I will check your version :) Pablo -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Greg Burd Sent: Friday, July 02, 2010 3:27 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Multithreading

Re: [sqlite] Multithreading support approach

2010-07-02 Thread Greg Burd
I'm a tad biased...) > -Original Message- > From: Simon Slavin [mailto:slav...@bigfraud.org] > Sent: Friday, July 02, 2010 1:46 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Multithreading support approach > > > On 2 Jul 2010, at 6:

Re: [sqlite] Multithreading support approach

2010-07-02 Thread Simon Slavin
On 2 Jul 2010, at 6:14pm, Cargnelutti, Pablo Fernando wrote: > Sqlite implements table level lock? No. SQLite locks the entire database file with all tables and views in it. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Multithreading support approach

2010-07-02 Thread Cargnelutti, Pablo Fernando
Hi all, I'm a beginner user of this tool. I have to questions. What would be the better approach to multithread support for sqlite using C++ API? I'm currently try to block, using boost mutex, locks and condition variables, all calls to step method that attempts to modify the DB. Sqlite

[sqlite] multithreading (through C++ wrapper)

2010-03-30 Thread Aymeric . Moureau-EXT
Hello, I'm working on a C++ application under WinCE (file system is TexFAT), with SQLite (actually version 3.6.11, but phenomenon is reproduced with 3.6.23) with the following C++ wrapper : http://www.alhem.net/project/sqlite/index.html . There's only one database with three tables (file is

[sqlite] Re: Sqlite - Multithreading

2007-05-28 Thread Igor Tandetnik
Shilpa Sheoran <[EMAIL PROTECTED]> wrote: Does sqlite take care of pausing the other processes and resuming them later i.e after the write completes or will they get a SQLITE_BUSY error which they have to handle? By default, a blocked connection will get SQLITE_BUSY right away. You can

[sqlite] Sqlite - Multithreading

2007-05-28 Thread Shilpa Sheoran
All, According to the documentation.. "When any process wants to write, it must lock the entire database file for the duration of its update. But that normally only takes a few milliseconds. Other processes just wait on the writer to finish then continue about their business" Does sqlite take

Re: [sqlite] Multithreading. Again.

2006-06-08 Thread Florian Weimer
> Remember, that the operating system bug that is causing all the > multithreading grief is that file locks created by one thread > cannot be reliably removed or modified by a different thread. > So if a statement acquires a lock on the database file in one > thread and you try to finalize the

Re: [sqlite] multithreading!!!

2006-06-06 Thread John Stanton
Cesar, if you have an embedded application use Sqlite, it is perfect for the job. If you want to deploy an enterprise database with concurrent users use PostgreSQL, Mysql, Sql Server etc. Use Sqlite as you would use a single disk file. Cesar David Rodas Maldonado wrote: Please i beg to

[sqlite] multithreading!!!

2006-06-06 Thread Cesar David Rodas Maldonado
Please i beg to every one some one can give me some link or a little of theory of how can i do for write at same time in a database like the others databases??? please i want to do that..

Re: [sqlite] Multithreading. Again.

2006-06-06 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > Let's assume that for a given OS that fcntl() file locks > work perfectly well on any thread. Would it then be safe > from an SQLite perspective to finalize statements that were > prepared in one thread in a different thread? (where the sqlite > connection

Re: [sqlite] Multithreading. Again.

2006-06-05 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote: > Let's assume that for a given OS that fcntl() file locks > work perfectly well on any thread. Would it then be safe > from an SQLite perspective to finalize statements that were > prepared in one thread in a different thread? (where the sqlite >

Re: [sqlite] Multithreading. Again.

2006-06-05 Thread Joe Wilson
Let's assume that for a given OS that fcntl() file locks work perfectly well on any thread. Would it then be safe from an SQLite perspective to finalize statements that were prepared in one thread in a different thread? (where the sqlite connection would only be used on one thread at a time).

Re: [sqlite] Multithreading. Again.

2006-06-05 Thread John Stanton
hn Stanton [mailto:[EMAIL PROTECTED] Sent: Saturday, June 03, 2006 8:14 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multithreading. Again. Joe Wilson wrote: Remember, that the operating system bug that is causing all the multithreading grief is that file locks created by one thr

Re: [sqlite] Multithreading. Again.

2006-06-05 Thread Nikki Locke
Doug Nebeker wrote: > The problem with that solution is that it assumes all database access > happens from within a single process. As far as I understand it, SQLite > allows database access from multiple processes (and even from remote > processes I assume) and thus the locking has to happen

RE: [sqlite] Multithreading. Again.

2006-06-05 Thread Doug Nebeker
: [sqlite] Multithreading. Again. Joe Wilson wrote: >>Remember, that the operating system bug that is causing all the >>multithreading grief is that file locks created by one thread cannot >>be reliably removed or modified by a different thread. > > > You

Re: [sqlite] Multithreading. Again.

2006-06-03 Thread John Stanton
Joe Wilson wrote: Remember, that the operating system bug that is causing all the multithreading grief is that file locks created by one thread cannot be reliably removed or modified by a different thread. You could have a single thread that exclusively performs file locking/unlocking. This

Re: [sqlite] Multithreading. Again.

2006-06-03 Thread Joe Wilson
> Remember, that the operating system bug that is causing all the > multithreading grief is that file locks created by one thread > cannot be reliably removed or modified by a different thread. You could have a single thread that exclusively performs file locking/unlocking. This thread would wait

Re: [sqlite] Multithreading. Again.

2006-06-02 Thread drh
Florian Weimer <[EMAIL PROTECTED]> wrote: > > As long as no prepared statements are outstanding, you should > > be safe moving sqlite database connections across threads, as > > of version 3.3.1. The rules are not really quite that strict, > > but the exact rules are more complex and this strict

RE: [sqlite] Multithreading. Again.

2006-06-02 Thread Pat Wibbeler
block. In c++, I do it using a stack based destructor guard. Pat -Original Message- From: Florian Weimer [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 9:19 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multithreading. Again. > As long as no prepared stateme

Re: [sqlite] Multithreading. Again.

2006-06-02 Thread Florian Weimer
> As long as no prepared statements are outstanding, you should > be safe moving sqlite database connections across threads, as > of version 3.3.1. The rules are not really quite that strict, > but the exact rules are more complex and this strict rule > gives you an extra margin of safety. Is it

Re: [sqlite] Multithreading. Again.

2006-06-02 Thread drh
"Peter Cunderlik" <[EMAIL PROTECTED]> wrote: > > > 1. As of SQLite 3.3.5, there is no multithreading (MT) problem with > > > the SQLite itself. All problems come from the underlying OS libraries. > > > > I would argue that this has always been the case. But beginning > > in version 3.3.1, SQLite

Re: [sqlite] Multithreading. Again.

2006-06-02 Thread Peter Cunderlik
> 1. As of SQLite 3.3.5, there is no multithreading (MT) problem with > the SQLite itself. All problems come from the underlying OS libraries. I would argue that this has always been the case. But beginning in version 3.3.1, SQLite has taken additional steps to partially work around problems in

RE: [sqlite] Multithreading. Again.

2006-06-01 Thread Pat Wibbeler
OTECTED] Subject: Re: [sqlite] Multithreading. Again. "Peter Cunderlik" <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I'd like to ask a couple of silly questions before newcomers like me > get moderated. :-) I've browsed through the documentation and this > mailing li

Re: [sqlite] Multithreading. Again.

2006-06-01 Thread drh
"Peter Cunderlik" <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I'd like to ask a couple of silly questions before newcomers like me > get moderated. :-) I've browsed through the documentation and this > mailing list, trying to understand issues with multithreading. I'd > like if someone

[sqlite] Multithreading. Again.

2006-06-01 Thread Peter Cunderlik
Hello everybody, I'd like to ask a couple of silly questions before newcomers like me get moderated. :-) I've browsed through the documentation and this mailing list, trying to understand issues with multithreading. I'd like if someone could confirm my conclusions. 1. As of SQLite 3.3.5, there

[sqlite] MultiThreading in SQLite

2006-05-08 Thread Nitin Mahajan
Hi, I am using Sqlite with Java and driver I am using is javsqlite(http://www.ch-werner.de/javasqlite/). I want to have multiple threads reading data simultaneously from SQLite (as Sqlite claims to be Threadsafe) it seems to be possible. But going through java driver code, all methods which talk

Re: [sqlite] Multithreading Question

2005-10-24 Thread Jens Miltner
Am 21.10.2005 um 11:58 schrieb Michael J. Sviridov: Using sqlite 3.2.7 in a multi-threaded C++ application: I've got two thread's (with unique db handles), each thread does the following: BEGIN EXCLUSIVE TRANSACTION; (60,000 INSERT OR REPLACE statements into the same table) COMMIT

[sqlite] Multithreading (& C#) question

2005-10-21 Thread Lloyd Dupont
I have read that SQLite doesn't suport well multithreading... I have the following problem and wonder if anyone could provide me some guidance. I have a GUI application using SQLite to store its data. I have a 'Search' panel. Performing a search (scan of the database) in the background. And

[sqlite] Multithreading Question

2005-10-21 Thread Michael J. Sviridov
Hi All Using sqlite 3.2.7 in a multi-threaded C++ application: I've got two thread's (with unique db handles), each thread does the following: BEGIN EXCLUSIVE TRANSACTION; (60,000 INSERT OR REPLACE statements into the same table) COMMIT TRANSACTION; This works fine, as

Re: [sqlite] Multithreading with same sqlite struct

2005-06-10 Thread Cory Nelson
Yep, that's how I do it. Works fine. On 6/10/05, Brown, Dave <[EMAIL PROTECTED]> wrote: > > I read the docs on thread safety, where it says: > > "Threadsafe" in the previous paragraph means that two or more threads can > run SQLite at the same time on different "sqlite" structures returned

[sqlite] Multithreading with same sqlite struct

2005-06-10 Thread Brown, Dave
I read the docs on thread safety, where it says: "Threadsafe" in the previous paragraph means that two or more threads can run SQLite at the same time on different "sqlite" structures returned from separate calls to sqlite_open(). It is never safe to use the same sqlite structure pointer

Re: [sqlite] sqlite & multithreading

2005-02-07 Thread bbum
On Feb 7, 2005, at 10:21 AM, Alex Chudnovsky wrote: Correct me if I am wrong but I was under the impression that having 2 separate connections to database (and while on subject I noticed that making connection via ADO.NET takes significant time measured in seconds rather than in milliseconds)

Re: [sqlite] sqlite & multithreading

2005-02-07 Thread Alex Chudnovsky
[EMAIL PROTECTED] wrote: On Feb 7, 2005, at 9:50 AM, Yogesh Marwaha wrote: Both threads are using same sqlite connection. This is your problem. Each thread should use an isolated connection. Correct me if I am wrong but I was under the impression that having 2 separate connections to database

[sqlite] sqlite & multithreading

2005-02-07 Thread Yogesh Marwaha
Hi! Problem: 1 - I need some help using sqlite3 with multithreading. Here is an overview of present situation: - I am using sqlite 3.0.8 I have two threads (A & B) working at the same time. Thread A is used to query database while thread B is being used for writing to the database.

Re: [sqlite] Multithreading

2004-12-25 Thread Roger Binns
Well, currently SQLite seems to meet my performance needs. Currently I don't think that brewing my own file format would pay off. I will consider this only as a last solution. I was being somewhat facetious mainly to prove that you don't actually want best possible performance. You are far

Re: [sqlite] Multithreading

2004-12-25 Thread Rolf Schaeuble
Hello Roger, thanks for your answer. Answers inline. Roger Binns wrote: itself. However, I'm afraid that this will not lead to the best possible performance. If you want the best possible performance then don't use SQLite at all and instead make your own file format that exactly meets your

Re: [sqlite] Multithreading

2004-12-25 Thread Roger Binns
itself. However, I'm afraid that this will not lead to the best possible performance. If you want the best possible performance then don't use SQLite at all and instead make your own file format that exactly meets your needs and tradeoffs (memory, byte ordering, CPU, concurrency etc). result to

[sqlite] Multithreading

2004-12-25 Thread Rolf Schaeuble
Hello All, I'm sure this questions has already been asked thousands of times, but after searching the archive I still don't know the definite answer. Is it safe to access the same instance of an sqlite3 database (the same pointer returned by sqlite3_open) in several threads, provided that the

Re: [sqlite] multithreading

2004-02-27 Thread Dave Hayden
After reading that SQLite should Just Work, I dug through my code and found my bug: I was calling sqlite_reset before invoking my precompiled queries instead of afterwards. I changed it around and it seems to be fixed--leaving the vm in a running state must have held a lock somewhere? Many

Re: [sqlite] multithreading

2004-02-27 Thread Christian Smith
On Fri, 27 Feb 2004, D. Richard Hipp wrote: >[EMAIL PROTECTED] wrote: > > > > I'm trying to access the database from two threads: the UI thread mostly > > reads and occasionally updates rows, while the network thread loads new > > messages and inserts them. Will that work, or do I just

Re: [sqlite] multithreading

2004-02-27 Thread D. Richard Hipp
rumcais wrote: > 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. > The only ways to corrupt an

Re: [sqlite] multithreading

2004-02-26 Thread ben . carlyle
- Forwarded by Ben Carlyle/AU/IRSA/Rail on 27/02/2004 09:53 AM - Ben Carlyle 27/02/2004 09:49 AM To: [EMAIL PROTECTED]@CORP cc: Subject:Re: [sqlite] multithreading Dave, [EMAIL PROTECTED] 26/02/2004 04:56 PM To: [EMAIL PROTECTED

RE: [sqlite] multithreading

2004-02-26 Thread ben . carlyle
"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 processe

RE: [sqlite] multithreading

2004-02-25 Thread rumcais
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 26, 2004 7:56 AM > To: [EMAIL PROTECTED] > Subject: [sqlite] multithreading > > > I've been playing around with using SQLite for a data store in a > newsreader app for a few days now, and I keep getting the da

[sqlite] multithreading

2004-02-25 Thread dave
I've been playing around with using SQLite for a data store in a newsreader app for a few days now, and I keep getting the database stuck in a locked state. The only thing that seems to fix it is deleting the file and starting over. I tried recompiling with -DTHREADSAFE=1, but it didn't seem