Re: [sqlite] 'Database table is locked' error with libgpkg and SQLite >= 3.24.0

2018-11-21 Thread Benjamin Stadin
Thank you. The ruby helper class used by this library has indeed nested query executions. Modifying this class accordingly fixes the issue. Thanks Ben Am 21.11.18, 21:39 schrieb "drhsql...@gmail.com im Auftrag von Richard Hipp" : On 11/21/18, Benjamin Stadin wrote: > Hi, >

Re: [sqlite] 'Database table is locked' error with libgpkg and SQLite >= 3.24.0

2018-11-21 Thread Richard Hipp
On 11/21/18, Benjamin Stadin wrote: > Hi, > > I've forked libgpkg on Github to merge fixes from other repositories and > update the embedded SQLite (was at 3.8.). Though in the RTREE tests I get a > 'database table is locked' error for the update statements (see exact error > message below). Perh

Re: [sqlite] 'Database table is locked' error with libgpkg and SQLite >= 3.24.0

2018-11-21 Thread Dan Kennedy
On 11/21/2018 11:01 PM, Benjamin Stadin wrote: Hi, I've forked libgpkg on Github to merge fixes from other repositories and update the embedded SQLite (was at 3.8.). Though in the RTREE tests I get a 'database table is locked' error for the update statements (see exact error message below). I

[sqlite] 'Database table is locked' error with libgpkg and SQLite >= 3.24.0

2018-11-21 Thread Benjamin Stadin
Hi, I've forked libgpkg on Github to merge fixes from other repositories and update the embedded SQLite (was at 3.8.). Though in the RTREE tests I get a 'database table is locked' error for the update statements (see exact error message below). I ran the tests manually in the gpkg shell and cou

Re: [sqlite] database table is locked issue

2014-02-14 Thread Sandu Buraga
> > I have a process with several threads working in the same time on a > > database file. I have 0 or 1 writers and 0 or N readers at a moment. All > > write accesses are isolated in transactions, I am using WAL and shared > > cache, but sometimes during the DELETE statemens I get "database tab

Re: [sqlite] database table is locked issue

2014-02-12 Thread Simon Slavin
On 12 Feb 2014, at 4:44pm, Sandu Buraga wrote: > I have a process with several threads working in the same time on a > database file. I have 0 or 1 writers and 0 or N readers at a moment. All > write accesses are isolated in transactions, I am using WAL and shared > cache, but sometimes during t

[sqlite] database table is locked issue

2014-02-12 Thread Sandu Buraga
Hi, I have a process with several threads working in the same time on a database file. I have 0 or 1 writers and 0 or N readers at a moment. All write accesses are isolated in transactions, I am using WAL and shared cache, but sometimes during the DELETE statemens I get "database table is locked"

Re: [sqlite] "database table is locked" in sqlite_exec

2009-04-10 Thread Alexey Pechnikov
Hello! On Friday 10 April 2009 16:23:43 D. Richard Hipp wrote: > On Apr 10, 2009, at 5:58 AM, Alexey Pechnikov wrote: > > Note: TCL interface binds all as text values > > False. The following TCL script is proof by counter-example: > > package require sqlite3 > sqlite3 db :memory: > s

Re: [sqlite] "database table is locked" in sqlite_exec

2009-04-10 Thread D. Richard Hipp
On Apr 10, 2009, at 5:58 AM, Alexey Pechnikov wrote: > > Note: TCL interface binds all as text values False. The following TCL script is proof by counter-example: package require sqlite3 sqlite3 db :memory: set x [expr {1+2}] db eval { CREATE TABLE t1(x); INSERT INTO

Re: [sqlite] "database table is locked" in sqlite_exec

2009-04-10 Thread Alexey Pechnikov
Hello! Note: TCL interface binds all as text values and we can't use typeof() function (typeof returns 'text' for all fields). So we may use manual cast() to field datatype instead. Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-user

[sqlite] "database table is locked" in sqlite_exec

2009-04-10 Thread Alexey Pechnikov
Hello! This function doesn't work: sqlite> select userkey_uninstall(); SQL error: database table is locked static void userkey_uninstallFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ sqlite3 *db; int rc; /* Result code */ const char zSql[]

[sqlite] database table is locked when trying to delete a record after select

2006-01-08 Thread Justin Wu
It will be always get 'database table is locked' message when trying to delete a record after select. I'v tested on WinXP and Ubuntu 5.10, but got the same error. SQLite version v3.2.8 please see the following code #include #include #include #define DATFILE "test.dat" int main(int argc, ch

Re: [sqlite] database table is locked

2005-05-16 Thread Jay Sprenkle
> It's probably not a good idea, because it depends on some > behaviour that is not specified, but I once used a trick > like this to get good performance: > > CREATE TABLE abc(a, b); > UPDATE abc SET b = user2(a, b) WHERE AND user1(a, b); > > SQLite loops through the rows where is true, and >

Re: [sqlite] database table is locked

2005-05-14 Thread Gerry Snyder
Dan Kennedy wrote: It's probably not a good idea, because it depends on some behaviour that is not specified, but I once used a trick like this to get good performance: CREATE TABLE abc(a, b); UPDATE abc SET b = user2(a, b) WHERE AND user1(a, b); SQLite loops through the rows where is true, and r

RE: [sqlite] database table is locked

2005-05-13 Thread Dan Kennedy
It's probably not a good idea, because it depends on some behaviour that is not specified, but I once used a trick like this to get good performance: CREATE TABLE abc(a, b); UPDATE abc SET b = user2(a, b) WHERE AND user1(a, b); SQLite loops through the rows where is true, and remembers those fo

RE: [sqlite] database table is locked

2005-05-13 Thread Thomas Briggs
> No, that seems to work fine. I guess the table is locked for a > specific transaction, so you cannot have any problems with a lock held > by the very same transaction. > > > ie Below would return "database table is locked"? > > > > BEGIN TRANSACTION > > SELECT * from table1 WHERE col > x > >

RE: [sqlite] database table is locked

2005-05-13 Thread D. Richard Hipp
On Fri, 2005-05-13 at 15:16 +0100, Brandon, Nicholas wrote: > I think I might be getting confused on this subject as well. Does this mean > that SQLite 3.x can NOT process multiple inserts/updates within one > transaction if it is working on the same table? > > ie Below would return "database tabl

Re: [sqlite] database table is locked

2005-05-13 Thread Thomas Steffen
On 5/13/05, Brandon, Nicholas <[EMAIL PROTECTED]> wrote: > > I think I might be getting confused on this subject as well. Does this mean > that SQLite 3.x can NOT process multiple inserts/updates within one > transaction if it is working on the same table? No, that seems to work fine. I guess the

RE: [sqlite] database table is locked

2005-05-13 Thread Brandon, Nicholas
RE col > x UPDATE table1 SET col = ... INSERT INTO table1 COMMIT TRANSACTION Nick -Original Message- From: Thomas Briggs [mailto:[EMAIL PROTECTED] Sent: 12 May 2005 16:11 To: sqlite-users@sqlite.org Subject: RE: [sqlite] database table is locked *** WARNING ***

RE: [sqlite] database table is locked

2005-05-12 Thread Thomas Briggs
r your patience. :) -Tom > -Original Message- > From: Martin Engelschalk [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 12, 2005 9:53 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] database table is locked > > @Thomas Briggs, Jay Sprenckle > > I use th

Re: [sqlite] database table is locked

2005-05-12 Thread Martin Engelschalk
ocked. The entire many readers/single writer concept makes no sense if executing any query locks the whole database. -Tom -Original Message- From: Thomas Fjellstrom [mailto:[EMAIL PROTECTED] Sent: Thursday, May 12, 2005 7:10 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] datab

Re: [sqlite] database table is locked

2005-05-12 Thread Martin Engelschalk
query locks the whole database. -Tom -Original Message- From: Thomas Fjellstrom [mailto:[EMAIL PROTECTED] Sent: Thursday, May 12, 2005 7:10 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] database table is locked On May 12, 2005 04:59 am, Martin Engelschalk wrote: Hello

RE: [sqlite] database table is locked

2005-05-12 Thread Thomas Briggs
> update column in result row so I won't process it again. How exactly were you doing this? Building an SQL string and executing with sqlite3_exec, or did you prepare a parameterized UPDATE statement (using sqlite3_prepare) and executing it multiple times with sqlite3_step? -Tom

Re: [sqlite] database table is locked

2005-05-12 Thread Jay Sprenkle
ilto:[EMAIL PROTECTED] > > Sent: Thursday, May 12, 2005 7:10 AM > > To: sqlite-users@sqlite.org > > Subject: Re: [sqlite] database table is locked > > > > On May 12, 2005 04:59 am, Martin Engelschalk wrote: > > > Hello, > > > > > > i open cursor on

Re: [sqlite] database table is locked

2005-05-12 Thread Martin Engelschalk
Thank you, Thomas. I used a temporary table, and now it works. However, it seems that my code worked with sqlite 2. Can this be? Martin Thomas Fjellstrom schrieb: On May 12, 2005 04:59 am, Martin Engelschalk wrote: Hello, i open cursor on a table and retrieve rows from it. For every row i decide

RE: [sqlite] database table is locked

2005-05-12 Thread Thomas Briggs
, 2005 7:10 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] database table is locked > > On May 12, 2005 04:59 am, Martin Engelschalk wrote: > > Hello, > > > > i open cursor on a table and retrieve rows from it. > > For every row i decide whether to update i

Re: [sqlite] database table is locked

2005-05-12 Thread Thomas Fjellstrom
On May 12, 2005 04:59 am, Martin Engelschalk wrote: > Hello, > > i open cursor on a table and retrieve rows from it. > For every row i decide whether to update it. However, when executing > the update I get the error "database table is locked". > My application is the only one working on the table

[sqlite] database table is locked

2005-05-12 Thread Martin Engelschalk
Hello, i open cursor on a table and retrieve rows from it. For every row i decide whether to update it. However, when executing the update I get the error "database table is locked". My application is the only one working on the table. Is it illegal to update a table while selecting from it or am

Re: [sqlite] database table is locked

2005-03-16 Thread Marcel Strittmatter
SQLITE_BUSY - another process has the whole database locked SQLITE_LOCKED - one sqlite3_step() is trying to read (or write) the same table that another sqlite3_step() is writing (or reading) using the same DB handle. It sounds as if Mr. Strittmatter is

Re: [sqlite] database table is locked

2005-03-16 Thread D. Richard Hipp
On Wed, 2005-03-16 at 22:40 +0100, Jakub Adamek wrote: > Also the error description "database TABLE is locked" is sometimes wrong > because it is the whole database which is locked. Perhaps another error > code/message should be created for "database is locked" (e.g. with open > cursors). > Th

Re: [sqlite] database table is locked

2005-03-16 Thread Jakub Adamek
Hello, I had a similar experience, but there was too much code to create a simple bug report. Surprisingly, the error disappeared if I first made a "SELECT FROM table" before the "INSERT INTO table" on the same table. Also the error description "database TABLE is locked" is sometimes wrong becau

[sqlite] database table is locked

2005-03-16 Thread Marcel Strittmatter
Hi all When I try to insert data into a table, sqlite3 responses with SQLITE_ERROR and the error message: "database table is locked". I searched already for unfinalized statements but couln't find any. The insert statement is not executed while a query is active... The problem exists only on Wi

Re: [sqlite] database table is locked

2003-11-07 Thread Thiago Mello
Hi D. Richard, Thanks for your help, it seems that it worked fine. Regards, Thiago Mello Em Sex, 2003-11-07 às 11:46, D. Richard Hipp escreveu: > Thiago Mello wrote: > > > > BEGIN TRANSACTION; > > SELECT id,name FROM TABLE1; > > > > /* now in the callback function */ > > IF argv[1] = "JOHN";

Re: [sqlite] database table is locked

2003-11-07 Thread Thiago Mello
Hello, Will that decrease the performance of my application? Thanks, Thiago Mello Em Sex, 2003-11-07 às 11:46, D. Richard Hipp escreveu: > SQLite does not allow you to read and write the > same table at the same time. You need to finish the > read of TABLE1 before you start changing it. Perha

Re: [sqlite] database table is locked

2003-11-07 Thread Thiago Mello
Hi, Im sorry, I was not putting the hole explanation, but here it is. In my main I have this select: SELECT * FROM TABLE WHERE classe LIKE '%OHN%' ; /* inside the callback */ bipOrigem = argv[2]; bipDestino = argv[3]; UPDATE TABLE SET limiar=limiar+1 WHERE id="argv[0]"; if(bipDestino ==

Re: [sqlite] database table is locked

2003-11-07 Thread D. Richard Hipp
Thiago Mello wrote: BEGIN TRANSACTION; SELECT id,name FROM TABLE1; /* now in the callback function */ IF argv[1] = "JOHN"; UPDATE TABLE1 SET number=n+1 WHERE id=X /* return from the Callback function */ END TRANSACTION; But I still get a error: "database table is locked". Is still something wro

Re: [sqlite] database table is locked

2003-11-07 Thread Mrs. Brisby
On Sat, 2003-11-08 at 07:20, Thiago Mello wrote: > Hi Ben Carlyle, > > First of all, thanks for your help! > > I can't brig these two operation togethe causa I need the result of the > SELECT in a if condition. You cannot do the UPDATE inside of a SELECT callback. You do not need the results of

Re: [sqlite] database table is locked

2003-11-07 Thread Thiago Mello
Hi Ben Carlyle, First of all, thanks for your help! I can't brig these two operation togethe causa I need the result of the SELECT in a if condition. So, what I did was separate with transaction, soh I did something like this: BEGIN TRANSACTION; SELECT id,name FROM TABLE1; /* now in the call

Re: [sqlite] database table is locked

2003-11-06 Thread ben . carlyle
- Forwarded by Ben Carlyle/AU/IRSA/Rail on 07/11/2003 10:03 AM - Ben Carlyle 07/11/2003 10:03 AM To: Thiago Mello <[EMAIL PROTECTED]>@CORP cc: Subject: Re: [sqlite] database table is locked Thiago Mello <[EMAIL PROTECTED]> 08/11/2

[sqlite] database table is locked

2003-11-06 Thread Thiago Mello
Hi, Im doing a SELECT sql query, and in the callback function of this sql query I do a UPDATE, so when I do this update I get database table is locked. How I cant do the UPDATE in the second sqlite_exec() function?! Thanks, Thiago Mello ---