Re: [sqlite] Sqlite in dead lock state when deleting records from the same table from different threads

2014-07-01 Thread Simon Slavin
> On 1 Jul 2014, at 10:36pm, Igor Tandetnik wrote: > > On 7/1/2014 5:20 PM, Igor Tandetnik wrote: >> On 7/1/2014 4:55 PM, Clemens Ladisch wrote: >>> To prevent deadlocks, transactions that will modify the database should >>> be started with BEGIN IMMEDIATE. (This kind of

Re: [sqlite] Sqlite in dead lock state when deleting records from the same table from different threads

2014-07-01 Thread Igor Tandetnik
On 7/1/2014 5:20 PM, Igor Tandetnik wrote: On 7/1/2014 4:55 PM, Clemens Ladisch wrote: To prevent deadlocks, transactions that will modify the database should be started with BEGIN IMMEDIATE. (This kind of lock is not available in shared cache mode.) Are you sure? Nothing in the

Re: [sqlite] Sqlite in dead lock state when deleting records from the same table from different threads

2014-07-01 Thread Igor Tandetnik
On 7/1/2014 4:55 PM, Clemens Ladisch wrote: To prevent deadlocks, transactions that will modify the database should be started with BEGIN IMMEDIATE. (This kind of lock is not available in shared cache mode.) Are you sure? Nothing in the documentation appears to suggest that. But I must admit

Re: [sqlite] Sqlite in dead lock state when deleting records from the same table from different threads

2014-07-01 Thread Igor Tandetnik
On 7/1/2014 4:40 PM, Srikanth Bemineni wrote: 10:00.234 Thread 1 BEGIN 10:00.235 Thread 1 select * from 10:00.234 Thread 1 select * from 10:00.456 Thread 1 delete from 10:00.456 Thread 2 BEGIN 10:00.456 Thread 2 select * from 10:00.906 Thread 2 select * from 10:01.156 Thread 2 delete from

Re: [sqlite] Sqlite in dead lock state when deleting records from the same table from different threads

2014-07-01 Thread Clemens Ladisch
Srikanth Bemineni wrote: > Lately we are seeing a dead lock kind of state while deleting records > from a table. > > All threads open their own shared connection to the database. Why are you using shared cache mode? To prevent deadlocks, transactions that will modify the database should be

[sqlite] Sqlite in dead lock state when deleting records from the same table from different threads

2014-07-01 Thread Srikanth Bemineni
Hi, We are using the sqlite 3.7.14.1 code in our application. Lately we are seeing a dead lock kind of state while deleting records from a table. The deletion is done two different threads and acting upon the same table. Sqlite is configured in WAL mode. All threads open their own shared

Re: [sqlite] 64-bit precompiled command-line shell binary

2014-07-01 Thread RSmith
Apologies this reply went to the wrong mailbox - rectified here. On 2014/07/01 20:19, Gert Van Assche wrote: Thanks for your replay. I'm not a developer, and I don't know how to compile the source code. The reason why I think I will need a 64-bit exe is that the 32-bit one is limited to 2GB

Re: [sqlite] 64-bit precompiled command-line shell binary

2014-07-01 Thread RSmith
On 2014/07/01 18:52, Gert Van Assche wrote: Maybe a stupid question: how should I use this DLL? just put in the same folder as the sqlite3.exe? Not a stupid question at all - in fact my mistake, the previous request was for the 64-bit DLL and of course any time you compile SQLite into your

Re: [sqlite] 64-bit precompiled command-line shell binary

2014-07-01 Thread Gert Van Assche
Maybe a stupid question: how should I use this DLL? just put in the same folder as the sqlite3.exe? 2014-07-01 16:39 GMT+02:00 RSmith : > > On 2014/07/01 14:29, Gert Van Assche wrote: > >> All, >> >> where could I download a 64-bit sqlite3.exe for running on Windows 8? >>

Re: [sqlite] Multiple SQLiteDataReader objects against a single connection

2014-07-01 Thread Joseph L. Casale
> By doing exactly what you have described. > > What is the problem? Hey Clemens, Sorry I should have updated the thread, I was receiving an "There is already an open DataReader associated with this Command which must be closed first." exception which was simply from a lack of paying attention.

Re: [sqlite] Importing a lot of data from many databases

2014-07-01 Thread Gert Van Assche
Thanks Simon, this is exactly what I needed to know. gert 2014-07-01 16:48 GMT+02:00 Simon Slavin : > > > On 1 Jul 2014, at 12:26pm, Gert Van Assche wrote: > > > > 1 - Open the BIG db, attach all small files, ten by 10, and copy the > tables > > from

Re: [sqlite] Multiple SQLiteDataReader objects against a single connection

2014-07-01 Thread Clemens Ladisch
Joseph L. Casale wrote: > How does one accomplish this in the case where I iterate over a long result > set > with the first reader open, then open a new reader against a prepared > statement > and pass in a value derived from the first reader. By doing exactly what you have described. What is

Re: [sqlite] Fwd: signal 6 during sqlite_step in WAL mode

2014-07-01 Thread Simon Slavin
On 1 Jul 2014, at 2:50pm, Mattan Shalev wrote: > Valgrind only shows " > > Warning: set address range perms: large range [0x7dc88040, 0x8f5d2058) > (undefined)", which is a debug msg for developers. > > > Also, forgot to mention that the reader threads are initiated via

Re: [sqlite] Importing a lot of data from many databases

2014-07-01 Thread Simon Slavin
> On 1 Jul 2014, at 12:26pm, Gert Van Assche wrote: > > 1 - Open the BIG db, attach all small files, ten by 10, and copy the tables > from the attached databases to the big table. I can speed up the import by > putting the INSERT in a transaction. > > 2 - Export one by one

Re: [sqlite] 64-bit precompiled command-line shell binary

2014-07-01 Thread RSmith
On 2014/07/01 14:29, Gert Van Assche wrote: All, where could I download a 64-bit sqlite3.exe for running on Windows 8? From an earlier reply by Richard Hipp: A 64-bit Windows DLL is now available athttp://www.sqlite.org/download.html ___

Re: [sqlite] think I need better error-handling guidance in the C API

2014-07-01 Thread Simon Slavin
On 1 Jul 2014, at 2:22am, Keith Medcalf wrote: > IF ResultCode == A_OK YipeeKiAiii else OhShitItDidntWork; > > Seems pretty straightforward to me. You handle the result codes you know > what to do with, and everything that remains means your program should > explode

Re: [sqlite] think I need better error-handling guidance in the C API

2014-07-01 Thread Eric Rubin-Smith
Keith Medcalf wrote: > IF ResultCode == A_OK YipeeKiAiii else OhShitItDidntWork; > > Seems pretty straightforward to me. You handle the result codes you > know what to do with, There is a difference between things I don't personally know how to handle and things that the SQLite authors

Re: [sqlite] Fwd: signal 6 during sqlite_step in WAL mode

2014-07-01 Thread Mattan Shalev
Valgrind only shows " Warning: set address range perms: large range [0x7dc88040, 0x8f5d2058) (undefined)", which is a debug msg for developers. Also, forgot to mention that the reader threads are initiated via gSoap, though the signal always occur from sqlite. On Tue, Jul 1, 2014 at 11:58 AM,

[sqlite] 64-bit precompiled command-line shell binary

2014-07-01 Thread Gert Van Assche
All, where could I download a 64-bit sqlite3.exe for running on Windows 8? Thanks, Gert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Importing a lot of data from many databases

2014-07-01 Thread Gert Van Assche
All, I'm using the windows shell and I have to import one table from 50.000 small sqlite files into one big sqlite file. These are the 2 options I see: 1 - Open the BIG db, attach all small files, ten by 10, and copy the tables from the attached databases to the big table. I can speed up the

Re: [sqlite] error "malformed database schema" on view in attached table

2014-07-01 Thread Gert Van Assche
Bingo! That was indeed the problem, Kevin. I'm sorry I did not find that user group posting. Thanks. 2014-07-01 11:30 GMT+02:00 Kevin Benson : > On Tue, Jul 1, 2014 at 5:07 AM, Gert Van Assche wrote: > > > All, > > > > I get this error message: > >

[sqlite] signal 6 during sqlite_step in WAL mode

2014-07-01 Thread Mattan Shalev
Hey guys, I'm getting signal 6 during sqlite_step in WAL mode. Working on Ubuntu 12.04, sqlite3 3.7.9. One process is the writing continuously, while other process reads from the DB in a multi threaded access. I made sure that sqlite is configured to serialised mode. Here is the backtrace: #0

[sqlite] Fwd: Regarding SQlite support for accessing documents library in windows store app.

2014-07-01 Thread Vedika Neha Shabraya
Hi, I have a windows metro app which uses SQLite database. I want to create and write to a SQLite db file present in user's documents library. I am able to do so only in the app's local data folder and app's installed location which I do not want. But unable to so so in the users documents

[sqlite] Aggragate functions

2014-07-01 Thread James Nash
Suggestions for aggregate functions: median(), percentile() reason - this functions are costly due to time to transfer. Would be nice if they were computed locally Suggestion for function to deprecate (keep for backward compatibility): total() reason - cost

Re: [sqlite] error "malformed database schema" on view in attached table

2014-07-01 Thread Richard Hipp
Can you please send us the complete schema (as shown by the ".schema" command in the command-line shell) for both the original database and the database you are trying to attach? On Tue, Jul 1, 2014 at 5:07 AM, Gert Van Assche wrote: > All, > > I get this error message: > >

Re: [sqlite] error "malformed database schema" on view in attached table

2014-07-01 Thread Kevin Benson
On Tue, Jul 1, 2014 at 5:07 AM, Gert Van Assche wrote: > All, > > I get this error message: > > malformed database schema (WrongTargetLang) - view [WrongTargetLang] cannot > reference objects in database main > > when I try to attach a database containing a view. If I delete

[sqlite] error "malformed database schema" on view in attached table

2014-07-01 Thread Gert Van Assche
All, I get this error message: malformed database schema (WrongTargetLang) - view [WrongTargetLang] cannot reference objects in database main when I try to attach a database containing a view. If I delete the view, I get this message for another view. I get that message for all views. I can

Re: [sqlite] Fwd: signal 6 during sqlite_step in WAL mode

2014-07-01 Thread Dan Kennedy
On 07/01/2014 12:07 PM, Mattan Shalev wrote: Hey guys, I'm getting signal 6 during sqlite_step in WAL mode. Working on Ubuntu 12.04, sqlite3 3.7.9. One process is the writing continuously, while other process reads from the DB in a multi threaded access. I made sure that sqlite is configured to

Re: [sqlite] Fwd: signal 6 during sqlite_step in WAL mode

2014-07-01 Thread Eduardo Morras
On Tue, 1 Jul 2014 08:07:52 +0300 Mattan Shalev wrote: > Hey guys, > I'm getting signal 6 during sqlite_step in WAL mode. Working on Ubuntu > 12.04, sqlite3 3.7.9. > One process is the writing continuously, while other process reads > from the DB in a multi threaded access.

Re: [sqlite] hoe to create index to a big table - resolution

2014-07-01 Thread Hadashi, Rinat
Hi Thanks Gerd and Dan and Ryan. I received answers that helped me understand and solve my problem by redirecting temp data to a directory rather than in-memory. I tried Dan's proposal to SETENV TMPDIR and afterwards I could successfully create index. I will try Gerd's pragma proposal as well