Re: [sqlite] FTS4 Problem

2014-12-24 Thread Dan Kennedy
On 12/25/2014 08:04 AM, Peter Truskier wrote: As I mentioned, I seem to have solved the problem by doing a "rebuild" command on the FTS4 table. But, as I thought about it further, I'm still confused as to why dropping, and then re-creating the virtual table didn't solve the problem as well.

Re: [sqlite] COMMIT nested in SELECT returns unexpected

2014-12-24 Thread Simon Slavin
On 25 Dec 2014, at 3:17am, Keith Medcalf wrote: > Using a separate connection for the INSERT/COMMIT also will not work because > it will not be able to get a write lock while the select is running. Should some part of the library then be producing an error which can be

Re: [sqlite] COMMIT nested in SELECT returns unexpected

2014-12-24 Thread Keith Medcalf
APSW does the same thing. I suspect that the commit operation is invalidating the select (since it is performed while the select is running) -- the effect of performing a commit in the middle of a running select (on the same connection) is (or should be) undefined. It will free the rollback

Re: [sqlite] FTS4 Problem

2014-12-24 Thread Peter Truskier
As I mentioned, I seem to have solved the problem by doing a "rebuild" command on the FTS4 table. But, as I thought about it further, I'm still confused as to why dropping, and then re-creating the virtual table didn't solve the problem as well. What am I missing? Thanks, Peter > On Dec

Re: [sqlite] COMMIT nested in SELECT returns unexpected

2014-12-24 Thread Simon Slavin
On 24 Dec 2014, at 6:39pm, Jim Carroll wrote: > I actually tried this same idea yesterday, but it made no difference. Even > manually creating cursors and executing all statements through them yielded > the exact same problem. > > For simplicity, I kept the code sample short,

Re: [sqlite] COMMIT nested in SELECT returns unexpected

2014-12-24 Thread Jim Carroll
> Date: Wed, 24 Dec 2014 14:53:47 + > From: Simon Slavin > Sorry, I may have just realised what's wrong. You are misusing your > python library. > See the documentation at > > > > You cannot always use .execute against

Re: [sqlite] COMMIT nested in SELECT returns unexpected results

2014-12-24 Thread Jim Carroll
> Date: Wed, 24 Dec 2014 15:47:41 +0200 > From: RSmith > > In the meantime, could you kindly post the actual connector or SQLite > interface used and which version of it (both the > connector/interface and the SQLite versions) so that we can test fully. We are using sqlite3

Re: [sqlite] FTS4 Problem

2014-12-24 Thread Peter Truskier
Thanks so much for the quick AND HELPFUL response! I had run the pragma, but was unaware of the command. When I ran the 'integrity-check' command on the virtual table, I got a "database disk image is malformed Error Code 11" Running the 'rebuild' command seems to have fixed the problem. I

Re: [sqlite] Whish List for 2015

2014-12-24 Thread Gerry Snyder
The only thing on my SQLite wish list is for the development team to have a meaningful holiday season and a happy, healthy, and productive new year. The details of the "productive" part I leave in their capable hands. What has been added each year has far surpassed my expectations, and I

Re: [sqlite] FTS4 Problem

2014-12-24 Thread Richard Hipp
Have you run integrity checks on the database file ( https://www.sqlite.org/pragma.html#pragma_integrity_check) and on the FTS4 tables (https://www.sqlite.org/fts3.html#integcheck)? Do they all look correct? On Wed, Dec 24, 2014 at 2:40 PM, Peter Truskier wrote: > I have

[sqlite] FTS4 Problem

2014-12-24 Thread Peter Truskier
I have an sqlite database in which I've created a virtual table using FTS4. For nearly a year, we've been using it to do full text searching with no problem. The database contains a table of products (tblProducts) with columns id, SKU, itemDesc, etc. The virtual table is created like this:

Re: [sqlite] COMMIT nested in SELECT returns unexpected results

2014-12-24 Thread Simon Slavin
> On 24 Dec 2014, at 10:50am, Jim Carroll wrote: > > #!/usr/bin/env python > import sqlite3 as sq Sorry, I may have just realised what's wrong. You are misusing your python library. See the documentation at You cannot

Re: [sqlite] COMMIT nested in SELECT returns unexpected results

2014-12-24 Thread RSmith
On 2014/12/24 12:50, Jim Carroll wrote: I understand that performing a SELECT and nested COMMIT on the same table is not supported in sqlite, but I would have expected a COMMIT on a separate table would not be a problem. Some test code in python however reveals that performing the COMMIT

Re: [sqlite] COMMIT nested in SELECT returns unexpected results

2014-12-24 Thread Simon Slavin
On 24 Dec 2014, at 10:50am, Jim Carroll wrote: > I understand that performing a SELECT and nested COMMIT on the same table is > not supported in sqlite, but I would have expected a COMMIT on a separate > table would not be a problem. Some test code in python however reveals

[sqlite] COMMIT nested in SELECT returns unexpected results

2014-12-24 Thread Jim Carroll
I understand that performing a SELECT and nested COMMIT on the same table is not supported in sqlite, but I would have expected a COMMIT on a separate table would not be a problem. Some test code in python however reveals that performing the COMMIT disrupts the SELECT statement, and causes