Re: [sqlite] Multithread

2017-03-06 Thread Jens Alfke
> On Mar 6, 2017, at 7:10 AM, Наиль Шигапов wrote: > > Today for fetch or write information from different thread, i lock thread if > database is lock(write, read,e.t.c) But i don’t want lock my thread. I read > from documentation about «vfs» technology in sqlite. Does it make sense to > crea

[sqlite] Multithread

2017-03-06 Thread Наиль Шигапов
Hellow! I write small orm based on sqlite database from ios - application! I have one or more question about multi-thread in sqlite. Today for fetch or write information from different thread, i lock thread if database is lock(write, read,e.t.c) But i don’t want lock my thread. I read from do

[sqlite] MultiThread Error 10 on Windows Mobile 6.x

2015-11-04 Thread Joe Mistachkin
Jim Morris wrote: > > at line 37428: > while( cnt-->0 && (res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS, > PENDING_BYTE, 0, 1, 0))==0 ){ > Are you using version 3.9.2 or some other version? > > cnt = 2 > locktype = 1//SHARED_LOCK > lastErrno =

[sqlite] MultiThread Error 10 on Windows Mobile 6.x

2015-11-04 Thread Jim Morris
Problem is trying to get a shared lock in sqlite.c, "static int winLock(sqlite3_file *id, int locktype)" at line 37428: while( cnt-->0 && (res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS, PENDING_BYTE, 0, 1, 0))==0 ){ cnt = 2 locktype = 1//SHARED_LO

[sqlite] MultiThread Error 10 on Windows Mobile 6.x

2015-11-04 Thread Jim Morris
No. The app works, however when I scroll the list there are may requests to get records from the DB and it seems to interact with the background thread to produce this error. On 11/3/2015 7:02 PM, Joe Mistachkin wrote: > Jim Morris wrote: >> Is there a graceful work around? >> >> >>(38

[sqlite] MultiThread Error 10 on Windows Mobile 6.x

2015-11-03 Thread Joe Mistachkin
Jim Morris wrote: > > Is there a graceful work around? > > > (3850) SQLITE_IOERR_LOCK > Are any of the underlying database files read-only? -- Joe Mistachkin

[sqlite] MultiThread Error 10 on Windows Mobile 6.x

2015-11-03 Thread Jim Morris
I have a connection used by the main (UI) thread and recently added a background thread, with own connection(no shared cache) to upload changes to server on Windows Mobile 6.0/6.5 devices and upgraded to SQLite 3.9.2. The background thread is getting an error 10, extended error 3850 as a resul

[sqlite] MultiThread Performance Gain Attempts

2012-08-17 Thread esum
Hi, I am using sqlite version 3.7.13 in a multithreaded application (transactions with writes and reads will be called from different parallel threads within one process), and I am trying to gain performance. I would also like in some way to keep an on disk record of the database as the program r

[sqlite] multithread problem

2007-03-20 Thread Rafi Cohen
Hi, I probably asked about this before, but as I'm having some problems with my implementation, I would like to ask more clear questions. The main part of the application does not modify the database, but quries it occasionally (select). The other thread is responsible for the changes (import from

RE: [sqlite] Multithread access to DB

2006-03-21 Thread Drew, Stephen
can coexist with a single RESERVED lock. RESERVED differs from PENDING in that new SHARED locks can be acquired while there is a RESERVED lock. -Original Message- From: Rafal Rusin [mailto:[EMAIL PROTECTED] Sent: 21 March 2006 15:03 To: sqlite-users@sqlite.org Subject: Re: [sqlite

Re: [sqlite] Multithread access to DB

2006-03-21 Thread Rafal Rusin
Sqlite has 3 types of locks, which is weird for me. Could You explain what is a "reserved lock"? Read and read/write (exclusive) locks are apparent. http://www.sqlite.org/capi3ref.html#sqlite3_busy_handler Best Regards, Rafal Rusin TouK Company (www.touk.pl)

Re: [sqlite] Multithread access to DB

2006-03-13 Thread Jay Sprenkle
On 3/13/06, Rafal Rusin <[EMAIL PROTECTED]> wrote: > > Maybe you want to call this: > > > > " int sqlite3_busy_timeout(sqlite3*, int ms); > > > > This routine sets a busy handler that sleeps for a while when a table > > is locked. The handler will sleep multiple times until at least "ms" > > m

Re: [sqlite] Multithread access to DB

2006-03-13 Thread Deepak Kaul
I had major problems with multithreaded access to a sqlite database file on an NFS mount. While not exactly your scenerio there might be some similarities. I had to come up with a crazy scheme to allow only one thread to access the sqlite database at a time. See below. I came up with a sch

Re: [sqlite] Multithread access to DB

2006-03-13 Thread Rafal Rusin
> Maybe you want to call this: > > " int sqlite3_busy_timeout(sqlite3*, int ms); > > This routine sets a busy handler that sleeps for a while when a table > is locked. The handler will sleep multiple times until at least "ms" > milliseconds of sleeping have been done. After "ms" milliseconds o

Re: [sqlite] Multithread access to DB

2006-03-13 Thread Jay Sprenkle
On 3/13/06, Rafal Rusin <[EMAIL PROTECTED]> wrote: > Hello, > > I'm having problems with famous multithread bug > "Database is locked". > I tried to work around that with sqlite3_busy_timeout > or busy_handler, but with no success. I had deadlocks. > I was using version 3.3.4 on Debian Linux. > Cou

[sqlite] Multithread access to DB

2006-03-13 Thread Rafal Rusin
Hello, I'm having problems with famous multithread bug "Database is locked". I tried to work around that with sqlite3_busy_timeout or busy_handler, but with no success. I had deadlocks. I was using version 3.3.4 on Debian Linux. Could You give me some links to discussion on that topic? Maybe there