Re: [sqlite] SQLite bug?

2012-03-07 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/12 21:01, Steinar Midtskogen wrote: > xCreate()/xConnect() will run through the argument list and do a PRAGMA > table_info(%s) and then a couple of SELECT ... FROM %s. The point I was trying to make is that this is not a generic SQLite issue,

Re: [sqlite] SQLite Amalgamation

2012-03-07 Thread Cory Nelson
On Wed, Mar 7, 2012 at 9:58 PM, Andrew Cherednik wrote: > Hi guys, > > > > Decided to open a discussion on SQLite amalgamation. Please forgive us, > Windows users, who unlucky enough to use Microsoft Visual Studio. As many of > you know, it is year 2012 now, and Visual Studio is up to version 10

Re: [sqlite] SQLite bug?

2012-03-07 Thread Steinar Midtskogen
Roger Binns writes: > On 07/03/12 13:46, Steinar Midtskogen wrote: >> I think indeed that this is a problem: > > I cannot reproduce it using my own virtual tables. This strongly implies > that it is something to do with the code for your virtual tables. Doesn't > your 'interpolate' module use e

Re: [sqlite] sqlite-users Digest, Vol 51, Issue 1

2012-03-07 Thread Andrew Cherednik
CASE WHEN Name like 'A?' THEN 1 ELSE 0 END Regards,   Andrew Cherednik "IMPORTANT - This email contains confidential information intended only for the person named above and may be subject to legal privilege. If you are not the intended recipient, any disclosure, copying or use of this infor

Re: [sqlite] sqlite-users Digest, Vol 51, Issue 1

2012-03-07 Thread YAN HONG YE
For a table named bb: I have a sqlite database named bb: > NamePrice1Price2Slevel > A123 231 NULL > A22212 NULL > A3 21223 NULL UPDATE bb SET Slevel = CASE price1>12 WHEN 1 THEN 1 ELSE 0 END +

[sqlite] SQLite Amalgamation

2012-03-07 Thread Andrew Cherednik
Hi guys, Decided to open a discussion on SQLite amalgamation. Please forgive us, Windows users, who unlucky enough to use Microsoft Visual Studio. As many of you know, it is year 2012 now, and Visual Studio is up to version 10, but the guys at Microsoft still use 16-bit indices for the debugg

Re: [sqlite] GUI for SQLite

2012-03-07 Thread BareFeetWare
On 08/03/2012, at 8:47 AM, Rose, John B wrote: > We are new to SQLite and have experimented with a few GUIs, Firefox plugin, > SQLite DB Browser, and Navicat. Is there a single GUI that is considered the > best, with the most features? Some time back, I compared several SQLite GUI editors, main

Re: [sqlite] Is it guaranteed that aggregate functions access tables sequentially?

2012-03-07 Thread Jay A. Kreibich
On Wed, Mar 07, 2012 at 10:30:54PM +, Emmanuel MacCaull scratched on the wall: > Hi, > > I'm writing a custom aggregate function whose result depends on the sort > order of a subselect. It isn't clear whether this a good idea Not a good idea. > and the documentation on group_concat(X) se

Re: [sqlite] GUI for SQLite

2012-03-07 Thread Oliver Peters
Am 07.03.2012 22:47, schrieb Rose, John B: We are new to SQLite and have experimented with a few GUIs, Firefox plugin, SQLite DB Browser, and Navicat. Is there a single GUI that is considered the best, with the most features? I prefer http://www.yunqa.de/delphi/doku.php/products/sqlitespy/ind

[sqlite] Is it guaranteed that aggregate functions access tables sequentially?

2012-03-07 Thread Emmanuel MacCaull
Hi, I'm writing a custom aggregate function whose result depends on the sort order of a subselect. It isn't clear whether this a good idea and the documentation on group_concat(X) seems to suggest that the order that rows are processed by an aggregate function is not guaranteed ("The order of t

Re: [sqlite] SQLite bug?

2012-03-07 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/12 13:46, Steinar Midtskogen wrote: > I think indeed that this is a problem: I cannot reproduce it using my own virtual tables. This strongly implies that it is something to do with the code for your virtual tables. Doesn't your 'interpolat

Re: [sqlite] GUI for SQLite

2012-03-07 Thread J Glassy
Hello, Everyone has their own opinion on which SQLite GUI is 'best'. I've had the best consistent luck over the years using the SQLite Manager/Firefox plugin, in terms of a good mix of features and availability on different platforms. There may be better ones out there though, depending on exact

[sqlite] GUI for SQLite

2012-03-07 Thread Rose, John B
We are new to SQLite and have experimented with a few GUIs, Firefox plugin, SQLite DB Browser, and Navicat. Is there a single GUI that is considered the best, with the most features? Thanks ___ sqlite-users mailing list sqlite-users@sqlite.org http://s

Re: [sqlite] SQLite bug?

2012-03-07 Thread Steinar Midtskogen
Steinar Midtskogen writes: > I can easily check that the argument doesn't match argv[2], but if > it's still possible to get into a loop like this if virtual tables > refer to eachother, then I don't think it's possible to detect this in > the VT code. I think indeed that this is a problem: sql

Re: [sqlite] SQLite bug?

2012-03-07 Thread Steinar Midtskogen
"Jay A. Kreibich" writes: > On Wed, Mar 07, 2012 at 08:58:27PM +0100, Steinar Midtskogen scratched on the > wall: >> I've created a module which will take a table as an argument. In >> Xconnect it will run a query on that table. Then I accidently used >> the name of the virtual table in the ar

Re: [sqlite] SQLite bug?

2012-03-07 Thread Jay A. Kreibich
On Wed, Mar 07, 2012 at 08:58:27PM +0100, Steinar Midtskogen scratched on the wall: > I've created a module which will take a table as an argument. In > Xconnect it will run a query on that table. Then I accidently used > the name of the virtual table in the argument list: > > CREATE VIRTUAL T

[sqlite] SQLite bug?

2012-03-07 Thread Steinar Midtskogen
I've created a module which will take a table as an argument. In Xconnect it will run a query on that table. Then I accidently used the name of the virtual table in the argument list: CREATE VIRTUAL TABLE v USING my_module(v); which seems to have triggered an infinite call loop. I suppose wha

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Jay A. Kreibich
On Wed, Mar 07, 2012 at 12:40:08PM -0500, Pavel Ivanov scratched on the wall: > >> Another option is to start IMMEDIATE transaction in the second process > >> to avoid this course of action altogether. > > > > ?Yes. ?That won't fix the issue (you'll still get contention issues > > ?that will requir

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Pavel Ivanov
>> Another option is to start IMMEDIATE transaction in the second process >> to avoid this course of action altogether. > >  Yes.  That won't fix the issue (you'll still get contention issues >  that will require restarting the transaction) but they'll show up >  at the beginning of the transaction

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Jay A. Kreibich
On Wed, Mar 07, 2012 at 08:41:17AM -0500, Pavel Ivanov scratched on the wall: > First your second process gets a SHARED lock on the database to read > it, then your first process gets RESERVED lock on the database to > indicate that it will change it. Then your second process tries to > promote its

Re: [sqlite] What do people think of SQLite Root?

2012-03-07 Thread Don V Nielsen
Thumbs up on SqliteExpert. I use it too. Very nice. dvn On Tue, Mar 6, 2012 at 7:20 PM, Stephen Chrzanowski wrote: > I use SQLite Expert. There is a fee for the professional version, but it > is one time, all updates are free. > > http://www.sqliteexpert.com/ > > > On Tue, Mar 6, 2012 at 1:43

Re: [sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread Marcus Grimm
>>> You can do the backup and after that do an integrity check on the >>> backup. Surely you're backing up on a different >>> server, don't you? If the back up pass the integrity check it a real >>> backup, if not, launch a warning. >> >> Yeah, that's a good idea. >> Ohh boy, why I didn't think ab

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Simon Slavin
On 7 Mar 2012, at 1:55pm, Pavel Ivanov wrote: > On Wed, Mar 7, 2012 at 8:49 AM, Simon Slavin wrote: >> On 7 Mar 2012, at 1:41pm, Pavel Ivanov wrote: >> >>> First your second process gets a SHARED lock on the database to read >>> it, then your first process gets RESERVED lock on the database t

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Pavel Ivanov
On Wed, Mar 7, 2012 at 8:49 AM, Simon Slavin wrote: > On 7 Mar 2012, at 1:41pm, Pavel Ivanov wrote: > >> First your second process gets a SHARED lock on the database to read >> it, then your first process gets RESERVED lock on the database to >> indicate that it will change it. Then your second p

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Simon Slavin
On 7 Mar 2012, at 1:41pm, Pavel Ivanov wrote: > First your second process gets a SHARED lock on the database to read > it, then your first process gets RESERVED lock on the database to > indicate that it will change it. Then your second process tries to > promote its SHARED lock to RESERVED one,

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Pavel Ivanov
First your second process gets a SHARED lock on the database to read it, then your first process gets RESERVED lock on the database to indicate that it will change it. Then your second process tries to promote its SHARED lock to RESERVED one, sees that RESERVED lock has been already taken and can't

Re: [sqlite] What's the best way to organize this database?

2012-03-07 Thread Simon Slavin
On 6 Mar 2012, at 8:48pm, John Salerno wrote: > Thanks to both of you. The question of normalization was one thing I was > considering, I just wasn't sure how it should be done. A separate table > with Artist ID and Artist Name fields could be useful. Would it be good to > make an equivalent

Re: [sqlite] About doc generation tool of SQLite

2012-03-07 Thread linuxbbs
Found it Thx very much At 2012-03-07 20:24:51,"Richard Hipp" wrote: >On Wed, Mar 7, 2012 at 2:09 AM, linuxbbs wrote: > >> In document of SQLite in URL:http://www.sqlite.org/capi3ref.html >> It says: "This document is created by a script which scans comments in the >> source code files." >> I

Re: [sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread TeDe
Am 07.03.2012 13:21, schrieb Marcus Grimm: > > On 07.03.2012 13:13, Eduardo Morras wrote: >> At 12:22 07/03/2012, you wrote: >>> Dear list, >>> >>> I'm using the backup api to frequently backup >>> a running sqlite database. >>> >>> I'm wondering if the backup API is able to detect a corrupt >>> da

Re: [sqlite] What's the best way to organize this database?

2012-03-07 Thread John Salerno
Thanks to both of you. The question of normalization was one thing I was considering, I just wasn't sure how it should be done. A separate table with Artist ID and Artist Name fields could be useful. Would it be good to make an equivalent table for the songs, or should the songs simply be liste

Re: [sqlite] About doc generation tool of SQLite

2012-03-07 Thread Richard Hipp
On Wed, Mar 7, 2012 at 2:09 AM, linuxbbs wrote: > In document of SQLite in URL:http://www.sqlite.org/capi3ref.html > It says: "This document is created by a script which scans comments in the > source code files." > I tried to find this script in the repo of SQLite, but I didn't find it. > Is the

Re: [sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread Marcus Grimm
On 07.03.2012 13:13, Eduardo Morras wrote: At 12:22 07/03/2012, you wrote: Dear list, I'm using the backup api to frequently backup a running sqlite database. I'm wondering if the backup API is able to detect a corrupt database or will it simply also backup a corrupt DB ? I evaluating the ne

Re: [sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread Eduardo Morras
At 12:22 07/03/2012, you wrote: Dear list, I'm using the backup api to frequently backup a running sqlite database. I'm wondering if the backup API is able to detect a corrupt database or will it simply also backup a corrupt DB ? I evaluating the need to issue a (timeconsuming) "pragma integr

Re: [sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread Marcus Grimm
On 07.03.2012 12:53, Simon Slavin wrote: On 7 Mar 2012, at 11:22am, Marcus Grimm wrote: I evaluating the need to issue a (timeconsuming) "pragma integrity_check" prior running the backup to avoid that a backup will be overwritten with an invalid database. Did you know about

Re: [sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread Simon Slavin
On 7 Mar 2012, at 11:22am, Marcus Grimm wrote: > I evaluating the need to issue a (timeconsuming) "pragma integrity_check" > prior > running the backup to avoid that a backup will be overwritten > with an invalid database. Did you know about

Re: [sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread Dan Kennedy
On 03/07/2012 06:22 PM, Marcus Grimm wrote: Dear list, I'm using the backup api to frequently backup a running sqlite database. I'm wondering if the backup API is able to detect a corrupt database or will it simply also backup a corrupt DB ? Backup just copies pages. It will not detect corrup

Re: [sqlite] processes stuck on database locked

2012-03-07 Thread Simon Slavin
On 7 Mar 2012, at 9:00am, Mikołaj Radwan wrote: > After a couple iterations both processes start getting the "database > locked" error and never work again unless one of them is killed. My guess is that one or other processes are not closing the connection properly on the run previous to the

[sqlite] Backup API handling of corrupt source DB

2012-03-07 Thread Marcus Grimm
Dear list, I'm using the backup api to frequently backup a running sqlite database. I'm wondering if the backup API is able to detect a corrupt database or will it simply also backup a corrupt DB ? I evaluating the need to issue a (timeconsuming) "pragma integrity_check" prior running the backu

[sqlite] file preallocation with SQLITE_FCNTL_SIZE_HINT questions...

2012-03-07 Thread Gabriel Corneanu
Hello all, I'm currently designing a new file format using sqlite for some specialized hardware; previously it wasn't possible, but the new WAL mode fulfills my needs. Except for some small summary info, the data is appended only. I have some other simple requirement to preallocate a file size: I

[sqlite] processes stuck on database locked

2012-03-07 Thread Mikołaj Radwan
Hi all, For a couple days now I've been trying to figure out this problem and can't seem to manage. I have two processes, both of which connect to the same SQLite database and do the following: process 1: # opens database PRAGMA foreign_keys = ON; PRAGMA journal_mode = PERSIST; INSERT INTO som

Re: [sqlite] UPDATE failure

2012-03-07 Thread A . Azzolini
I'm sure about 'Id_' presence (it is used successfully in other saving operations close to UPDATE) My doubt is about implicit sum: Gross=Gross+ integer_value this operation works fine for about 64 consecutive times and then I found a mismatch. It seems to be solved only by reducing the spee

Re: [sqlite] Once again about file change counter

2012-03-07 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Or did you mean something else? What I meant was that you leave the main database using the normal SQLite VFS. Then you implement a custom VFS whose intent is to be used as the target for backups, and source for restores. ie the backup file is a s