Re: [sqlite] TestFixture 3.7.2 - Some WAL tests fail on QNX OS

2010-10-06 Thread Dan Kennedy
her way, you're looking for the point where that buffer pWal->apWiData[0] is overwritten with zeroes. Dan. > Thanks, > Praveen > > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org > ] On Behalf Of Dan Kennedy > Sent: Wed

Re: [sqlite] [BUG] JOIN subquery in FROM with FTS3 table

2010-10-07 Thread Dan Kennedy
On Oct 7, 2010, at 5:50 PM, Shopsland gmail wrote: > Hi, > > Given this simple query with a subquery in FROM and a join with a > FTS3 table: > > SELECT news1.number, fts_news.title > FROM (SELECT number FROM news LIMIT 50) as news1, fts_news > WHERE news1.number=fts_news.docid > > The query

Re: [sqlite] TestFixture 3.7.2 - Some WAL tests fail on QNX OS

2010-10-08 Thread Dan Kennedy
On Oct 8, 2010, at 9:44 PM, Raj, Praveen wrote: > Hello, > > I debugged the SQLite functions and here is my finding: > > The call to "mmap" in the function "unixShmMap" is causing the issue. > void *pMem = mmap(0, szRegion, PROT_READ|PROT_WRITE, > MAP_SHARED, pShmNode->h,

Re: [sqlite] handling of BLOB bound parameters

2010-10-14 Thread Dan Kennedy
On Oct 14, 2010, at 5:43 PM, Jens Miltner wrote: > I just stumbled across a problem where sqlite would be stuck for > quite a long time inside sqlite3VdbeExpandSql when using bound BLOB > parameters, i.e. my query looks like > > INSERT INTO foo VALUES (?,?,?,?...) > > and one of the

Re: [sqlite] TestFixture 3.7.2 - Some WAL tests fail on QNX OS

2010-10-14 Thread Dan Kennedy
be really confident though - there may be race conditions lurking... Thanks for looking into this. Dan. > > This is all my understanding and not sure if this is causing the > actual issue. Please guide me if my approach/understanding is > incorrect. > > > Thanks, > P

Re: [sqlite] Just want to double check on index need

2010-10-14 Thread Dan Kennedy
On Oct 14, 2010, at 10:43 PM, Alan Chandler wrote: > I am porting an application (American Football Results Picking > Competition) over from a Postgres databaseo to SQLite which involves > some fairly intense queries. I am doing this partially to do some > performance comparisons although I

Re: [sqlite] Just want to double check on index need

2010-10-14 Thread Dan Kennedy
On Oct 14, 2010, at 11:56 PM, Alan Chandler wrote: > On 14/10/10 17:28, Dan Kennedy wrote: >> >> On Oct 14, 2010, at 10:43 PM, Alan Chandler wrote: >>> CREATE TABLE div_winner_pick ( > ... >>> PRIMARY KEY (cid,confid,divid,uid) >>> ); > >

Re: [sqlite] TestFixture 3.7.2 - Some WAL tests fail on QNX OS

2010-10-15 Thread Dan Kennedy
apNew[0], iRegion*szRegion, MS_SYNC); > void *pMem = mmap(0, szRegion, PROT_READ|PROT_WRITE, > MAP_SHARED, pShmNode->h, pShmNode->nRegion*szRegion > ); > > With the above msync() call all my failed test cases are passing. > > I don't see any msync()

Re: [sqlite] Attach on disk database to memory database

2010-10-15 Thread Dan Kennedy
On Oct 15, 2010, at 11:40 PM, Schoinya wrote: > > Hello everybody > > I'm trying to attach on disk database to in memory database. > > But I get the strange error : SQLite error unrecognized token: ":" > > The following is the code: > >SQLiteConnection connInMemory = new >

Re: [sqlite] Scaling of Cache

2010-10-18 Thread Dan Kennedy
On Oct 19, 2010, at 9:01 AM, Doug wrote: > I'm not going to pretend to understand the SQLite source, but it seems > like having a mutex per PCache1 (ie the param passed in to > pcache1Fetch > and other cache functions) would be a good approach instead of the > global > mutex. But that

Re: [sqlite] Foreign key on different database - possible?

2010-10-20 Thread Dan Kennedy
On Oct 20, 2010, at 3:59 PM, Frank Millman wrote: > Hi all > > I am using SQLite 3.7.2 on Fedora 10. > > I have multiple databases, which I can access concurrently by using > the > 'attach' command, and then referring to each table using > 'database.tablename'. It works well. > > Now I want to

Re: [sqlite] Foreign key on different database - possible?

2010-10-20 Thread Dan Kennedy
On Oct 20, 2010, at 4:47 PM, Frank Millman wrote: > Dan Kennedy wrote: >> >> On Oct 20, 2010, at 3:59 PM, Frank Millman wrote: >> >>> Hi all >>> >>> I am using SQLite 3.7.2 on Fedora 10. >>> >>> I have multiple databases, which

Re: [sqlite] BUG

2010-10-26 Thread Dan Kennedy
On Oct 26, 2010, at 2:22 PM, Alexey Pechnikov wrote: >> But view_user statement makes no attempt to select the last >> version. It > picks some arbitrary random version. You might want to consider > something > like this: > > Why you wrote about "some arbitrary random version" when we have

Re: [sqlite] Mistake in threadtest3.c

2010-11-02 Thread Dan Kennedy
On Nov 2, 2010, at 5:12 PM, Andy Gibbs wrote: > Hi, > > I was looking at the diff to threadtest3.c in recent commit at > http://www.sqlite.org/src/fdiff?v1=58df1e3c060f534f=d6d209190c7110f9 > , and > I think I may have spotted an mistake in the code at the end of the > function > "static void

Re: [sqlite] A question about transactions

2010-11-04 Thread Dan Kennedy
On Nov 4, 2010, at 1:30 AM, Igor Tandetnik wrote: > Pavel Ivanov wrote: >>> Yes. That's precisely the intended use case. Remember though that >>> the transaction is not really committed until COMMIT statement >>> runs: if your application crashes or machine loses power,

Re: [sqlite] Query planner bug on "distinct" clause

2010-11-08 Thread Dan Kennedy
On Nov 8, 2010, at 5:12 AM, Alexey Pechnikov wrote: > sqlite> .s object_record > CREATE TABLE object_record > ( > record_id INTEGER PRIMARY KEY, > ts INTEGER NOT NULL DEFAULT (strftime('%s','now')), > object_id INTEGER NOT NULL > ); > CREATE INDEX object_id_ts_idx on

Re: [sqlite] INSERT OR IGNORE with rtree virtual tables

2010-11-08 Thread Dan Kennedy
>> In the shell: >> >> SQLite version 3.7.3 >> Enter ".help" for instructions >> Enter SQL statements terminated with a ";" >> sqlite> CREATE VIRTUAL TABLE a_rt USING rtree( _id, min_x, max_x, >> min_y, max_y ); >> sqlite> INSERT OR IGNORE INTO a_rt ( _id, min_x, max_x, min_y, >> max_y ) >>

Re: [sqlite] Strange WAL mode on 5GB+ database

2010-11-11 Thread Dan Kennedy
On Nov 11, 2010, at 3:47 AM, Alexey Pechnikov wrote: > $ ls -lh merch.db* > -rw-r--r-- 1 - - 5,8G Ноя 10 23:01 merch.db > -rw-r--r-- 1 - - 32K Ноя 10 23:04 merch.db-shm > -rw-r--r-- 1 - - 449M Ноя 10 23:01 merch.db-wal > > sqlite> pragma journal_mode; > wal > sqlite> pragma

Re: [sqlite] Trouble with TRIGGERS

2010-11-16 Thread Dan Kennedy
On 11/16/2010 06:25 AM, Bernard Ertl wrote: > Hi, > > I'm experiencing some performance issues with triggers at the moment and > hoping someone can help shed some light on what is happening. > > I have a database with ~20 tables and>100 triggers. I noticed a severe > performance degradation

Re: [sqlite] Custom collating sequences and performance

2010-11-18 Thread Dan Kennedy
On 11/19/2010 05:22 AM, Duquette, William H (316H) wrote: > On 11/18/10 2:16 PM, "Drake Wilson" wrote: > > Quoth "Duquette, William H (316H)", on > 2010-11-18 14:08:10 -0800: >> It seems to me that it shouldn't be necessary for SQLite to

Re: [sqlite] Compile 64bit version of SQLIte on Solaris?

2010-11-22 Thread Dan Kennedy
On 11/22/2010 03:25 PM, Lynton Grice wrote: > Hi there, > > That does not work, I tried that already. > > # /usr/local/bin/gcc -m64 -D_FILE_OFFSET_BITS=64 -c -fPIC -DHAVE_USLEEP > sqlite3.c > sqlite3.c:1: sorry, unimplemented: 64-bit mode not compiled in > # > > And I am on a 64-bit Solaris box...

Re: [sqlite] NO_GETTOD

2010-11-22 Thread Dan Kennedy
On 11/22/2010 11:48 PM, Black, Michael (IS) wrote: > Bug in 3.7.3? > gcc -c -DNO_GETTOD sqlite3.c > sqlite3.c: In function âunixCurrentTimeInt64â: > sqlite3.c:27870: error: âiâ undeclared (first use in this function) > sqlite3.c:27870: error: (Each undeclared identifier is reported only once >

Re: [sqlite] WAL, durability, and synchronous=NORMAL

2010-11-25 Thread Dan Kennedy
On 11/25/2010 03:24 PM, Twylite wrote: > Hi, > > I am seeking technical information on the durability of transactions > with journal_mode=WAL and synchronous=NORMAL. > > Specifically, in the event of a power failure, can the following ever > happen: > (1) Loss of the last transaction completed. >

Re: [sqlite] autoindex1 test fail on linux debian

2010-11-25 Thread Dan Kennedy
On 11/25/2010 02:43 PM, Yoni wrote: > Hi, > > I get the following fail when running sqlite3 tests, under linux debian, > with TCL 8.4. > Code is latest from fossil. > Any help appreciated. Try with 8.5 or newer. ___ sqlite-users mailing list

Re: [sqlite] WAL, durability, and synchronous=NORMAL

2010-11-25 Thread Dan Kennedy
On 11/25/2010 08:49 PM, Simon Slavin wrote: > > On 25 Nov 2010, at 8:36am, Dan Kennedy wrote: > >> On 11/25/2010 03:24 PM, Twylite wrote: >>> > > Argh. Trevor, I'm going to find Stephenie Meyer and do something she doesn't > like. > >>> I am se

Re: [sqlite] Assertion failure in SQLite 3.7.3 (new vs. 3.6.23.1)

2010-11-25 Thread Dan Kennedy
On 11/25/2010 03:45 PM, Philip Graham Willoughby wrote: > Hi all, > > I'm noticing a new failure with SQLite 3.7.3 as compared to the previous > version I was using, 3.6.23.1. Are you able to share the database and the query that causes the assert() to fail?

Re: [sqlite] WAL, durability, and synchronous=NORMAL

2010-11-26 Thread Dan Kennedy
On 11/25/2010 09:04 PM, Simon Slavin wrote: > > On 25 Nov 2010, at 2:00pm, Dan Kennedy wrote: > >> In WAL mode with synchronous=NORMAL, when the user commits >> a transaction, it is written into the WAL file. No sync >> until a checkpoint happens. So if the power f

Re: [sqlite] searching with like on FTS3

2010-11-29 Thread Dan Kennedy
On 11/30/2010 12:09 AM, boscowitch wrote: > Hi recently I noticed that i can't search with the like '%searchword%' > syntax on an FTS3 virtual table. > > And with "match" i can't search on example sentences (the indexed data > is a japanese dictionary an therefore has no spaces in example

Re: [sqlite] WAL mode and backup API

2010-11-30 Thread Dan Kennedy
On 11/30/2010 05:03 PM, Marco Bambini wrote: > Hello, > > if a running sqlite database is in WAL mode and a backup is performed on that > db using the sqlite3_backup API, does that process is considered like a > reader and can proceed concurrently with other readers and with the other > writer?

Re: [sqlite] WAL mode and backup API

2010-11-30 Thread Dan Kennedy
> BTW: > Is there any chance that in the future the wal mode > will avoid that the backup API will restart on DB > changes during the backup loop ? > Currently, even in wal mode, it does restart when changes > are detected while the backup is ongoing. What happens if you open a read transaction

Re: [sqlite] EXPLAIN QUERY PLAN

2010-11-30 Thread Dan Kennedy
On 11/30/2010 11:38 PM, Duquette, William H (316H) wrote: > I've just discovered EXPLAIN QUERY PLAN; it looks quite useful, but one part > of the output is somewhat opaque. > > The command returns three columns: order, from, and detail. "order" is > evidently the order in which the indices are

Re: [sqlite] WAL file size

2010-12-02 Thread Dan Kennedy
In the current WAL format, the checksum for each frame is based on the contents of the frame, the salt-values in the wal header and the checksum of the previous frame. In this scheme is each frame checksum independent? i.e. each frame checksum is computed based only on the salt values in the WAL

Re: [sqlite] Assertion failure in SQLite 3.7.3 (new vs. 3.6.23.1)

2010-12-04 Thread Dan Kennedy
On 12/04/2010 12:54 AM, Philip Graham Willoughby wrote: > On 2 Dec 2010, at 20:43, Sylvain Pointeau wrote: > >> Hi, >> >> I am on macosx sqlite 3.7.3 >> >> $ /usr/local/bin/sqlite3 test.db3 >> SQLite version 3.7.3 >> Enter ".help" for instructions >> Enter SQL statements terminated with a ";" >>

Re: [sqlite] WAL file size

2010-12-07 Thread Dan Kennedy
On 12/07/2010 09:49 PM, Yoni Londner wrote: > Hi, > > Yes, in this scheme the checksum is based on salt values and own frame > content.a > > Note that the current design solve a potential DB corruption bug in > sqlite. current WAL design is base on the fact that once sqlite writes > pages

Re: [sqlite] FTS3 bug?

2010-12-07 Thread Dan Kennedy
On 12/08/2010 04:18 AM, Iker Arizmendi wrote: > The function that opens a cursor for the simple tokenizer, > simpleOpen, does not set the "pTokenizer" member of the > returned cursor. Ie, it appears the following line is > missing: > > c->base.pTokenizer = pTokenizer; > > which causes

Re: [sqlite] Problem with disableTerm() and virtual tables

2010-12-07 Thread Dan Kennedy
> > When I attempt to perform a certain join (shown below), the disableTerm > function fails in the ALWAYS assertion, because the wtFlags field already has > the TERM_CODED bit set. As far as I can tell, it is looking at the first > constraint in the ON clause of the LEFT JOIN, possibly for

Re: [sqlite] WAL index in memory - multiple connections

2010-12-09 Thread Dan Kennedy
On 12/09/2010 04:08 PM, Yoni Londner wrote: > Hi, > > I want to use the feature that enable WAL to use heap memory instead of > shared memory for WAL index. > Using locking_mode=exclusive is not good enough option, since I want to > access the DB from two threads, and with locking_mode=exclusive I

Re: [sqlite] BUSY on COMMIT when EXCLUSIVE is held is an unexpected result

2010-12-17 Thread Dan Kennedy
On 12/17/2010 07:54 PM, Ben Harper wrote: > I have this case: > > Thread 1 Thread 2 > -- > BEGIN EXCLUSIVE > BEGIN EXCLUSIVE -> BUSY > ... etc ... > BEGIN EXCLUSIVE -> BUSY > COMMIT >

Re: [sqlite] long running INSERT (up to now ~ 11 hours and still working)

2011-01-11 Thread Dan Kennedy
On 01/11/2011 03:00 PM, Oliver Peters wrote: > Hello, > > I'm on WinXP and using sqlite 3.7.4 with the CLI. I try to insert ~ 10,100,000 > records into a schema with different tables (http://pastebin.com/cbsPHNEj). > The > db file has already 1.9 GB when I start the INSERTs via > > sqlite3 -bail

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Dan Kennedy
On 01/13/2011 02:31 AM, Max Vlasov wrote: > Hi, > for queries like UPDATE ... WHERE rowid=... one can in most cases reread the > record (based on the rowid) and keep for example the cursor in the grid at > the same record. But what if one of changed field is aliased to rowid, is > there a way to

Re: [sqlite] Understanding EXPLAIN QUERY

2011-01-16 Thread Dan Kennedy
On 01/17/2011 06:36 AM, Sam Carleton wrote: > I am trying to optimize a query by using the EXPLAIN QUERY, but the > documentation on the web (http://www.sqlite.org/eqp.html) does not match the > version of SQLite I am using (v3.6.23.1). The documentation says there are > three columns, but I am

Re: [sqlite] JOIN bug in 3.7.2, not in 3.6.22

2011-01-17 Thread Dan Kennedy
> -- if endtime is in a different position in the table, the query works > CREATE TABLE interval (endtime INTEGER, entryid INTEGER, starttime INTEGER); > CREATE TABLE entry (id INTEGER PRIMARY KEY AUTOINCREMENT); > > INSERT INTO entry (id) VALUES ( 42); > > INSERT INTO interval (endtime,

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Dan Kennedy
On 01/25/2011 04:10 AM, Black, Michael (IS) wrote: > Is this if statement meant to be constant? Or should it be comparing the > requested encoding instead of SQLITE_UTF16NATIVE? > > SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *zIn, int nChar){ >int c; >unsigned char const *z = zIn;

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Dan Kennedy
On 01/25/2011 12:20 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 01/24/2011 06:05 PM, Roger Binns wrote: >> I'm finding custom VFS code is no longer working at all. > > The cause is a new xFileControl operation SQLITE_FCNTL_SYNC which appears to > needlessly

Re: [sqlite] EXTERNAL:Re: SQLite version 3.7.5 - code freeze

2011-01-25 Thread Dan Kennedy
On 01/25/2011 07:30 PM, Black, Michael (IS) wrote: > Yes -- MSVC spits out a bunch of constant expression warnings. Most are > bogus (e.g. while (1)). I looked at them all. > > In this case if it's a compile-time option (which it is) wouldn't you > normally put it in an #if block? Normally.

Re: [sqlite] Query question

2011-01-25 Thread Dan Kennedy
On 01/25/2011 09:47 PM, Ian Hardingham wrote: > Hey guys. > > I have the following table: > > ratingsTable (id INTEGER PRIMARY KEY AUTOINCREMENT, mtId INTEGER, user > TEXT, rating INTEGER); > > mtId links to another table's primary key > > I wish to have a query which gives me the mtId which is

Re: [sqlite] WAL for single user database on NFS and Solaris

2011-01-30 Thread Dan Kennedy
On 01/30/2011 10:06 AM, Ginn Chen wrote: > I think a single process accessing a single Sqlite database at a time over > NFS is supposed to be fine. > > But it is not working on Solaris. > On Solaris, man page of mmap() has > > EAGAINThe file to be mapped is already locked using >

Re: [sqlite] WAL for single user database on NFS and Solaris

2011-01-31 Thread Dan Kennedy
On 01/31/2011 11:53 AM, Shawn Wilsher wrote: > On Sun, Jan 30, 2011 at 8:26 PM, Dan Kennedy<danielk1...@gmail.com> wrote: >> If you set "PRAGMA locking_mode=EXCLUSIVE" before reading or >> writing the WAL-mode database it might work. > That would make u

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
On 02/02/2011 09:31 PM, Tiberio, Sylvain wrote: > Hi! > > > > I have a problem when I try to create a new database in a thread and try > to add a table on it. > > > > The following C code (see in the end of this e-mail) produces: The program is working Ok with 3.7.5 here. After the IO error in

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
occurs in Sparc/Solaris 10 system. > - After my program error, the file try.db exists and has the correct > right -rw-r--r--, correct owner/group and a null size. > > Regards, > > Sylvain > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sq

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
in multi-threaded apps? Something like -D_POSIX_C_SOURCE=199506L or -mt perhaps? Is SQLite being compiled with the same thread-related switches as the rest of the app? Dan. > > Sylvain > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun.

Re: [sqlite] Trigger for incrementing a column is slow

2011-02-03 Thread Dan Kennedy
On 02/04/2011 06:01 AM, Kevin Wojniak wrote: > On Feb 3, 2011, at 2:27 PM, Jim Wilcoxson wrote: > >> On Thu, Feb 3, 2011 at 5:07 PM, Kevin Wojniak wrote: >> >>> >>> On Feb 3, 2011, at 11:41 AM, Petite Abeille wrote: >>> On Feb 3, 2011, at 6:53 PM, Kevin Wojniak wrote:

Re: [sqlite] Trigger for incrementing a column is slow

2011-02-04 Thread Dan Kennedy
On 02/04/2011 03:24 PM, Kevin Wojniak wrote: > > On Feb 3, 2011, at 10:35 PM, Dan Kennedy wrote: > >> Do you have a test program that we can use to reproduce this phenomenon? >> >> Dan. > > Here is a complete program: > http://pastie.org/pastes/1527560 &g

Re: [sqlite] Multithreading problem

2011-02-04 Thread Dan Kennedy
On 02/04/2011 01:04 AM, Tiberio, Sylvain wrote: > You're right! > > I checked the Solaris documentation the correct flag to compile > multithread program is -D_REENTRANT. > > I have reconfigured and remade sqlite libs: >./configure --enable-threadsafe CFLAGS=-D_REENTRANT >make > > I have

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-08 Thread Dan Kennedy
On 02/08/2011 06:00 PM, Dennis Geldhof wrote: > Hi all, > > > > I experienced some strange behavior between different versions of > sqlite. Our application uses the System.Data.Sqlite wrapper > (http://sqlite.phxsoftware.com/) which is on sqlite version 3.6.23.1, > but the tools we use to view the

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-08 Thread Dan Kennedy
On 02/08/2011 08:26 PM, Dennis Geldhof wrote: >> -Original Message- >> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >> boun...@sqlite.org] On Behalf Of Dan Kennedy >> Sent: dinsdag 8 februari 2011 12:33 >> To: sqlite-users@sqlite.org >>

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-08 Thread Dan Kennedy
On 02/08/2011 10:24 PM, Dennis Geldhof wrote: >> -Original Message- >> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >> boun...@sqlite.org] On Behalf Of Dan Kennedy >> Sent: dinsdag 8 februari 2011 14:51 >> To: sqlite-users@sqlite.org >>

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-09 Thread Dan Kennedy
On 02/09/2011 08:17 PM, Dennis Geldhof wrote: > I checked some things for the attached database. It is created with > sqlite version 3.6.3 or 3.6.23.1 with the help of the system.data.sqlite > wrapper. The header displays (with the ./showdb) version 3.7.4, so it is > opened and changed with a

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-09 Thread Dan Kennedy
On 02/10/2011 12:10 AM, Dan Kennedy wrote: > On 02/09/2011 08:17 PM, Dennis Geldhof wrote: >> I checked some things for the attached database. It is created with >> sqlite version 3.6.3 or 3.6.23.1 with the help of the system.data.sqlite >> wrapper. The header displays (with

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-09 Thread Dan Kennedy
> I didn't find a way yet to reproduce the issue with a "clean" database. > Only way I can reproduce it is with some of the database, like the > test.db3. So I'm running out of ideas. This is the theory. test.db3 is an auto-vacuum database. http://www.sqlite.org/src/info/89b8c9ac54 Dan.

Re: [sqlite] determine SQLITE_MAX_LENGTH or sql_limit/sqlite3_limit

2011-02-09 Thread Dan Kennedy
On 02/10/2011 01:56 AM, Vannus wrote: > Zeoslib is reading sqlite field lengths incorrectly, as it checks for > brackets after the field typename ie. CHAR(123) > presumably this is only affecting me because I haven't defined field lengths > in my sqlite3 db. > > I don't want to hard-code

Re: [sqlite] upgrading DB from 3.6.23 to 3.7.5

2011-02-11 Thread Dan Kennedy
On 02/11/2011 08:08 PM, Sam Carleton wrote: > On Fri, Feb 11, 2011 at 6:54 AM, Philip Graham Willoughby< > phil.willoug...@strawberrycat.com> wrote: > >> Hi Sam, >> >> On 11 Feb 2011, at 05:29, Sam Carleton wrote: >>> I am sure it is bad form, but attached is one of the 3.6.23 DB, it is >> only

Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR

2011-02-15 Thread Dan Kennedy
On 02/15/2011 06:04 PM, venkat easwar wrote: > Forgot to mention what error I am getting. > > near "order": syntax error > near "limit": syntax error - if i remove the order by clause See under the "Optional LIMIT and ORDER BY Clauses" heading on this page:

Re: [sqlite] FTS slowdown with matchinfo

2011-02-15 Thread Dan Kennedy
On 02/16/2011 12:50 AM, Iker Arizmendi wrote: > Hello all, > > I'm running into what seems like an abnormally large > performance drop on on some FTS queries that use > matchinfo when compared to those that don't. > > I created an FTS table using the following: > > CREATE VIRTUAL TABLE test >

Re: [sqlite] foreign key on delete no action

2011-02-16 Thread Dan Kennedy
> foreign key ChildTable (ChildColumn1, ChildColumn2) > references ParentTable (ParentColumn1, ParentColumn2) > on delete no action > > I have a few questions: > > 1. What does SQLite do if the action is just left blank? Does it have the > same affect as explicitly writing

Re: [sqlite] FTS slowdown with matchinfo

2011-02-17 Thread Dan Kennedy
On 02/17/2011 05:41 AM, Iker Arizmendi wrote: > Dan Kennedy wrote: >> >> Can you make the database available for download? And >> supply the exact query you are using too? I'd like to >> know why this is. Thanks. >> >> Dan. >> > > You ca

Re: [sqlite] Upgrade from 3.5.8 -> 3.7.5 - increase memory usage

2011-02-20 Thread Dan Kennedy
On 02/21/2011 09:38 AM, Simon Slavin wrote: > > On 21 Feb 2011, at 1:47am, Roger Binns wrote: > >> On 02/20/2011 02:48 PM, Todd Shutts wrote: >>> The application >>> never used more than 10MB and it is currently using 57+MB and continues >>> to climb. >> >> The single most likely explanation is

Re: [sqlite] Reason for random names for the master journal?

2011-02-25 Thread Dan Kennedy
On 02/26/2011 12:30 AM, Johns Daniel wrote: > What is the reason was for having random filenames for the SQLite > master journal file (like mine.db-mj501CA440, mine.db-mj1C17, > mine.db-mj66677495, etc)? > > Here is the reason for this strange question. We have discovered that > the JFFS2

Re: [sqlite] Reason for random names for the master journal?

2011-02-25 Thread Dan Kennedy
>> For example, say you have two databases in a transaction - mine.db >> and yours.db. A crash happens while committing the transaction >> and the file mine.db-mjMASTER is left in the file-system. >> >> Following recovery, if a process tries to read mine.db, the >> transaction on mine.db will be

Re: [sqlite] long insert statement failing on iPhone

2011-02-28 Thread Dan Kennedy
On 02/26/2011 09:37 AM, Mickey Mestel wrote: > hi all, > > new to the list. > > we are compiling the sqlite.c amalgamation file into our project, as we > want to encrypt the database, and the sqlite that comes with the iOS sdk does > not allow for that. > > we are developing on

Re: [sqlite] Statements that return a result set?

2009-07-30 Thread Dan Kennedy
On Jul 30, 2009, at 5:12 PM, Robert Villanoa wrote: > Hi folk, > > I am new to SQLite, and I have a question: In SQLite, is there a > statement apart from SELECT statement that can return a result set? > Or the SELECT statement is the only statement that can return a > result set? As

Re: [sqlite] SQL error: database disk image is malformed - other possibility than dump/load

2009-07-31 Thread Dan Kennedy
On Jul 31, 2009, at 12:00 AM, rupert.thurner wrote: > is there another possibility but exporting and importing the data to > get rid of: > SQL error: database disk image is malformed > ? > > here the details of the error and the commands we used. but we are not > sure why exporting works and

Re: [sqlite] ANN: SQLite 3.6.16.C#

2009-08-03 Thread Dan Kennedy
On Aug 2, 2009, at 6:25 PM, Kosenko Max wrote: > > 9/30054 means 99.97% tests are working. > That's a great achievement anyway. > Performance problems can be profiled and optimized simpler than with > native > version. > > That isn't a nature of managed code to be slow. i.e. Perst DB which is

Re: [sqlite] ANN: SQLite 3.6.16.C#

2009-08-03 Thread Dan Kennedy
On Aug 3, 2009, at 2:06 PM, Kosenko Max wrote: > > > Dan Kennedy-4 wrote: >> McObject CEO Steve Graves points out that because of limits of the >> API >> they were using, SQLite performs each INSERT and DELETE in the test >> in a >> separate transaction

Re: [sqlite] help with inconsistent results and segfault

2009-08-03 Thread Dan Kennedy
On Aug 4, 2009, at 4:58 AM, Pavlos Christoforou wrote: > Hello all, > > We are currently evaluating sqlite for using it as the > base engine for a financial reporting module. We have some > fairly complex queries which yield strange results. We have > tried to isolate the problem below. Please

Re: [sqlite] Disk I/O error on AIX

2009-08-03 Thread Dan Kennedy
On Aug 4, 2009, at 5:11 AM, Ken wrote: > > Hi, > > I'm getting a Disk I/O error when committing a transaction on an AIX > system. > The file system is JFS. > > > The extended result code is 1290. Which i believe means that the > extended code is a SQLITE_IOERR_DIR_FSYNC error. > > Any ideas

Re: [sqlite] Disk IO ERROR on AIX

2009-08-07 Thread Dan Kennedy
On Aug 4, 2009, at 5:07 AM, Kenneth Long wrote: > > Hi, > > I'm getting a Disk I/O error when committing a transaction on an AIX > system. > > The extended result code is 1290. Which i believe means that the > extended code is a SQLITE_IOERR_DIR_FSYNC error. > > Any ideas why this is

Re: [sqlite] SQLite version 3.6.17

2009-08-13 Thread Dan Kennedy
On Aug 13, 2009, at 4:58 PM, Hugh Sasse wrote: > On Thu, 13 Aug 2009, Mike Frysinger wrote: > >> On Thursday 13 August 2009 05:04:26 Hugh Sasse wrote: >>> On Wed, 12 Aug 2009, Mike Frysinger wrote: On Monday 10 August 2009 11:51:40 Hugh Sasse wrote: > Make check doesn't do anything. My

Re: [sqlite] SQLite version 3.6.17

2009-08-14 Thread Dan Kennedy
On Aug 14, 2009, at 5:14 PM, Hugh Sasse wrote: > The upshot of my tests on Solaris9 was: > > WARNING: Multi-threaded tests skipped: Linked against a non- > threadsafe Tcl build > All memory allocations freed - no leaks > Memory used: now 0 max5727984 max-size >

Re: [sqlite] FTS3 and negation operator

2009-08-14 Thread Dan Kennedy
On Aug 15, 2009, at 9:32 AM, cscs-sql...@usa.net wrote: > > Did an FTS3 update change how many negation operators (dash/-) can > be used in > a > match statement? > > For example, in sqlite3.dll version 3.5.7: > > colname match 'tetons -bend -jackson -oxbow* -parks' works as > expected;

Re: [sqlite] 3.6.17 test failure

2009-08-14 Thread Dan Kennedy
On Aug 15, 2009, at 2:14 AM, Ken wrote: > I'm not sure if this an issue or not. make test failed with the > following: > > 2 errors out of 40872 tests > Failures on these tests: rollback-2.3 tkt3457-1.4 > All memory allocations freed - no leaks > Memory used: now 0 max

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-15 Thread Dan Kennedy
On Aug 15, 2009, at 1:08 PM, His Nerdship wrote: > > Good day, > We have a puzzling problem with a large (1GB+) database. > Most of our queries are based on 3 columns, say X, Y and Z. > X is always the first in the index. However, sometimes the query > involves a > small range of Y and a

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-15 Thread Dan Kennedy
On Aug 15, 2009, at 1:34 PM, Jim Showalter wrote: > How will that help him fix this problem, if the problem is that > SQLite's query optimizer is selecting a suboptimal index to use, and > there is no way to specify which index to use? The statistics collected by the ANALYZE command will be

Re: [sqlite] debugging sqlite with gdb

2009-08-15 Thread Dan Kennedy
On Aug 15, 2009, at 6:45 AM, udd...@cs.ucr.edu wrote: > Hey, > I am running sqlite-3.6.16. I am getting segmentation fault and so > trying > to run sqlite with gdb. But I am getting following error- > > /sqlite-3.6.16/sqlite3": not in executable format: File format not > recognized Could be

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Dan Kennedy
On Aug 17, 2009, at 11:05 AM, John Machin wrote: > On 17/08/2009 11:41 AM, Shane Harrelson wrote: >> INDEXED BY doesn't allow you to specify which index to use. It >> just causes >> the query to fail if SQLite thinks it should use an index different >> then the >> one specified by the

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-17 Thread Dan Kennedy
>> The INDEXED BY feature was introduced to address concerns that SQLite >> might >> suddenly start using a different plan for a query in the field than >> it >> did >> in the office during testing. Either because somebody ran ANALYZE, or >> because >> the SQLite version was upgraded. In this

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
On Aug 19, 2009, at 12:35 AM, Pavel Ivanov wrote: > You can always do > > insert into table (id, count) values (?1, (select count(*) + 1 from > table where id = ?1)) > > Though I'd be cautious about race condition that seems like possible > here when after select returned some value and before

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
On Aug 19, 2009, at 12:54 AM, Dan Kennedy wrote: > > On Aug 19, 2009, at 12:35 AM, Pavel Ivanov wrote: > >> You can always do >> >> insert into table (id, count) values (?1, (select count(*) + 1 from >> table where id = ?1)) >> >> Though I'd be

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
On Aug 19, 2009, at 1:01 AM, Pavel Ivanov wrote: >> Cannot happen. If not executed within an implicit transaction, each >> SQL statement is effectively wrapped in a transaction all of its own. > > So executing the insert/update/delete statement places RESERVED lock > right from the start before

Re: [sqlite] Huge numbers of savepoints.

2009-08-19 Thread Dan Kennedy
On Aug 19, 2009, at 3:07 PM, Chris Dew wrote: > http://www.sqlite.org/lang_savepoint.html > I'm looking for a datastore with the following properties: > * I need to 'mark' the state frequently (sub second interval). > * I need to be able to revert the datastore to a previous mark (with > no >

Re: [sqlite] about journal file

2009-08-27 Thread Dan Kennedy
On Aug 28, 2009, at 11:30 AM, Zhanjun You wrote: > Date: Thu, 27 Aug 2009 21:50:15 -0400 > From: "Igor Tandetnik" > Subject: Re: [sqlite] about journal file > To: sqlite-users@sqlite.org > Message-ID: > > Zhanjun You wrote: >> I can not find how

Re: [sqlite] Undefined Symbol: Tcl_CreateObjCommand

2009-08-29 Thread Dan Kennedy
On Aug 30, 2009, at 12:23 AM, carlos.tas...@farmerswife.com wrote: > Hi Dan, > > Yes I can confirm it. As more info here is the size of the so > > 407348 2009-08-29 19:03 tclsqlite-3.6.17.so Are you using 64-bit linux? Dan. ___ sqlite-users mailing

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: > I have two simple tables - one that defines a statistic, and one > that hold > the data for each statistic: > > CREATE TABLE Statistic > > ( > >StatID INTEGER PRIMARY KEY, > >OwningComputer TEXT NOT NULL > > ); > > > > CREATE

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: > I have two simple tables - one that defines a statistic, and one > that hold > the data for each statistic: > > CREATE TABLE Statistic > > ( > >StatID INTEGER PRIMARY KEY, > >OwningComputer TEXT NOT NULL > > ); > > > > CREATE

Re: [sqlite] Importing data into SQLite

2009-09-07 Thread Dan Kennedy
On Sep 7, 2009, at 9:32 AM, Kavita Raghunathan wrote: > Timothy and all, > When I try to import a .csv, I get a segmentation fault: > 1) First I set .seperator to , > 2) Then I type .import > 3) I see "Segmentation fault" Which version of SQLite is this happening with?

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
On Sep 11, 2009, at 1:58 PM, gprand wrote: > > Hi Richard, > > First, thanks for replying to my problem. > > Definitely answer to your assumptions ist no. I can see the correct > sql > statement into the debugger, nothing is malformed. Checking > sizeof(char) > delivers 1. Processing the

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

Re: [sqlite] InnoDB Transactions

2005-05-15 Thread Dan Kennedy
--- Ludvig Strigeus <[EMAIL PROTECTED]> wrote: > Quote: > > InnoDB must flush the log to disk at each transaction commit, if that > transaction made modifications to the database. Since the rotation speed of > a disk is typically at most 167 revolutions/second, that constrains the > number

Re: [sqlite] Sqlite2 vs Sqlite3 benchmark

2005-05-16 Thread Dan Kennedy
--- Ludvig Strigeus <[EMAIL PROTECTED]> wrote: > Dan Kennedy <[EMAIL PROTECTED]> wrote: > > For SQLite 3, the default value of the 'synchronous' pragma > > changed from "NORMAL" to "FULL". IIRC this means the disk is > > synced 3 times in

RE: [sqlite] Convert and isnumeric function

2005-05-16 Thread Dan Kennedy
> There's a former Nigeria dictator Charles Taylor that is even > worse. Liberia! Not that I could tell one from the other :) Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html

<    2   3   4   5   6   7   8   9   10   11   >