Re: [sqlite] Permissions issue with SQLite

2011-09-22 Thread Dan Kennedy
On 09/22/2011 09:20 PM, Stephan Beal wrote: On Thu, Sep 22, 2011 at 4:16 PM, Magnus Thor Torfason< zulutime@gmail.com> wrote: SQLite version 3.3.6 Just to preempt the inevitable request to try it on a current version: this is reproducible on 3.7.2 (Ubuntu 10.10). For new versions,

Re: [sqlite] SQLITE issues - IPAD development

2011-09-21 Thread Dan Kennedy
On 09/22/2011 01:30 AM, ecky wrote: Howdy I have a SQLITE database I created using the firefox plugin (SQLITE manager). I'm using that database in my IPAD app and I can read and write to it. However... I'm trying to debug some issue with my app so I copy the database file off my IPAD back

Re: [sqlite] Disk I/O Error on Ext3/write-back/barrier FS.

2011-09-20 Thread Dan Kennedy
On 09/20/2011 08:58 PM, Berthier, Emmanuel wrote: From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy Can you post the hex of the first 28 bytes of the journal file? 000 d5d9 f905 a120 d763 0400 a15c eae6 010 6300

Re: [sqlite] Disk I/O Error on Ext3/write-back/barrier FS.

2011-09-20 Thread Dan Kennedy
nb=4 so journal size should be = 512+4x1024=4608 B but is currently 3608 B). Can you post the hex of the first 28 bytes of the journal file? If you move the journal file out of the way, does the integrity-check succeed? Dan. ___ sqlite-users mail

Re: [sqlite] OMIT_VIRTUALTABLE

2011-09-14 Thread Dan Kennedy
On 09/14/2011 03:38 PM, Baruch Burstein wrote: When using OMIT_VIRTUALTABLE, I get a warning at line 11688 (3.7.7.1 amalgamation) that sqlite3GetVTable is used but never defined. If I add #ifndef SQLITE_OMIT_VIRTUALTABLE #endif around it, I get an error at line 81609, because this function is

Re: [sqlite] Strange performance problem

2011-09-05 Thread Dan Kennedy
On 09/06/2011 12:04 AM, Stephan Beal wrote: On Mon, Sep 5, 2011 at 6:59 PM, Dan Kennedy<danielk1...@gmail.com> wrote: You could get the same effect by wrapping your loop in a BEGIN/COMMIT block. Out of curiosity: would a BEGIN/ROLLBACK be equivalent for this case (where only S

Re: [sqlite] Strange performance problem

2011-09-05 Thread Dan Kennedy
On 09/05/2011 10:47 PM, Rado Rado wrote: I'm running simple prepared SELECT statement in loop ( about 3000 times ). It is something like "SELECT value FROM t WHERE t_id=? AND name=?". For most calls the row does not exist, step() returns SQLITE_DONE so I call reset after that(). The loop takes

Re: [sqlite] Speeding up index creation

2011-09-02 Thread Dan Kennedy
ecords in main memory in vdbesort.c. (user: dan, tags: merge-sort) CPU Time: user 118.451559 sys 132.117247 [71075673c6] Leaf: If all data being sorted fits in memory, avoid writing any data out to temporary files in vdbesort.c. (user: dan, tags: merge-sort) CPU Time: user 116.813549 sys 132.710051

Re: [sqlite] Speeding up index creation

2011-09-02 Thread Dan Kennedy
b-tree is larger than the cache, as you are always inserting into the right-most leaf node. No need to go searching through the file-system/disk for pages while building the b-tree. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Clarification about Triggers

2011-08-31 Thread Dan Kennedy
On 08/31/2011 06:34 PM, Black, Michael (IS) wrote: Doohyes "we" missed that. But shouldn't new.rowid be undefined then rather than return -1? Much like old.rowid is undefined? That might have helped "us" in recognizing "our" mistake. Fair enough. Sounded pompous. I say "we" because I

Re: [sqlite] Clarification about Triggers

2011-08-31 Thread Dan Kennedy
TE TRIGGER my_new_trigger AFTER INSERT ... and it should work. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Strange foreign key constraint failed with DROP TABLE

2011-08-22 Thread Dan Kennedy
table when FK constraints are >>> enabled does an implicit "DELETE FROM" first. >>> so how can there still be FK constraint violations? >>> Am I missing something? >> If so, then that would be the two of us. Though I think this is a bug >> in SQL

Re: [sqlite] fts3 table name cannot be the same as column name

2011-08-18 Thread Dan Kennedy
of the "hidden column". See the first paragraph under the second example block here: http://www.sqlite.org/fts3.html#section_1_4 Docs should be updated to say that you can't create a column with the same name as the table. Dan. ___ sqlite-users

Re: [sqlite] tcl incrblob interface

2011-08-11 Thread Dan Kennedy
On 08/10/2011 11:24 PM, Victor Mayevski wrote: > Hello, > > I am trying to learn how to use the "incrblob" command in the Tcl > interface and I can't get it to work. I create a one column table "t", > insert one empty value into it, than do "db incrblob t a 1", which > works fine, I get a file

Re: [sqlite] Possible bug in FTS3 or Parametrization?

2011-08-05 Thread Dan Kennedy
On 08/05/2011 05:44 PM, Martin Gill wrote: > On 5 August 2011 10:55, Dan Kennedy<danielk1...@gmail.com> wrote: >> >> On 08/05/2011 02:58 PM, Martin Gill wrote: >>> >>> CREATE VIRTUAL TABLE full_text USING FTS3 (id,text) >>> INSERT INTO fu

Re: [sqlite] Possible bug in FTS3 or Parametrization?

2011-08-05 Thread Dan Kennedy
On 08/05/2011 02:58 PM, Martin Gill wrote: > Hi all > > I have discovered what may be a bug in either SQLLite or System.Data.SQLite > (v 1.0.66.0 using SQLite 3.6.23.1). I certainly don't understand what's > happening and I'd apprecite it if someone could help me out; perhaps I'm > missing

[sqlite] Fwd: Re: assert() in debug build when running query

2011-08-03 Thread Dan Kennedy
Original Message Subject: Re: assert() in debug build when running query Date: Wed, 03 Aug 2011 15:00:46 +0200 From: Jens Miltner To: General Discussion of SQLite Database Sorry, should have mentioned that this happens with version

Re: [sqlite] Deep copy of 2 sqlite3*?

2011-08-02 Thread Dan Kennedy
On 08/03/2011 09:20 AM, Nikki Tan wrote: > Hi sqlite-users! > It's just that I'm writing a copy constructor of my own mini sqlite > wrapper, and I ended up having to do a deep copy of a sqlite3* points to a > SQLite connection. And I'm just wondering is it okay that I just do it with >

Re: [sqlite] LevelDB benchmark

2011-07-30 Thread Dan Kennedy
On 07/30/2011 12:19 PM, Dan Kennedy wrote: > On 07/30/2011 04:45 AM, Gabor Cselle wrote: >> Just a heads-up that we just posted an update to the benchmarks: >> - No more superfluous index on the primary key >> - WAL turned on with auto-checkpointing every

Re: [sqlite] LevelDB benchmark

2011-07-29 Thread Dan Kennedy
On 07/30/2011 04:45 AM, Gabor Cselle wrote: > Just a heads-up that we just posted an update to the benchmarks: > - No more superfluous index on the primary key > - WAL turned on with auto-checkpointing every 4096 pages > > http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html > > A diff of

Re: [sqlite] [FTS3] Understanding the Flow of data through the tokenizer

2011-07-24 Thread Dan Kennedy
On 07/24/2011 08:16 PM, Abhinav Upadhyay wrote: > Hi, > > I am trying to write my own custom tokenizer to filter stopwords apart > from doing normalization and stemming. I have gone through the > comments in fts3_tokenizer.h and also read the implementation of the > simple tokenizer. While overall

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-15 Thread Dan Kennedy
On 07/15/2011 01:10 PM, Alexey Pechnikov wrote: > 2011/7/15 Dan Kennedy<danielk1...@gmail.com>: >> I think you could just have the tokenizer return "dbms" whenever >> it sees "sqlite" in the input. > > But queries to original text will not work:

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
s" whenever it sees "sqlite" in the input. Both documents and tokens that appear in queries are transformed by tokenizers. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] caveat on blanket UPDATE triggers

2011-07-14 Thread Dan Kennedy
llow triggers on r-tree tables. Thanks, Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/14/2011 07:42 PM, Alexey Pechnikov wrote: >> No. Don't return anything for a stop word. Just advance to the next >> non stop-word token and return it. > > Thanks, I did and it's work. > > And another question... Is there any way to use multi-word synonyms? Like to: > sqlite -> Open Source

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/14/2011 05:29 PM, Alexey Pechnikov wrote: > With 0-length token in icuNext there is the error: > Error: SQL logic error or missing database > > May xNext returns 0 length when the token is stopword? No. Don't return anything for a stop word. Just advance to the next non stop-word token and

Re: [sqlite] Attach file/disk DB to memory DB

2011-07-13 Thread Dan Kennedy
On 07/13/2011 10:18 PM, Alexandre G wrote: > > If I was to attach a database located in a file on disk to a database located > in memory, would the file DB be loaded in memory too, or would its usage > remain disk-based? It remains on disk. Whether or not the main database is in-memory does not

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-13 Thread Dan Kennedy
On 07/13/2011 05:05 PM, Alexey Pechnikov wrote: > With synonyms dictionary the result token length can be more then > original token length. > Is it problem for current realization of FTS? I don't think so. If it is, it's a bug. Dan. ___ sql

Re: [sqlite] Data type of the blob returned by matchinfo()

2011-07-13 Thread Dan Kennedy
On 07/13/2011 04:57 AM, Abhinav Upadhyay wrote: > Hi, > > Quoting the ranking function given in the appendix of the FTS3 > documentation page (http://www.sqlite.org/fts3.html#appendix_a) > > static void rankfunc(sqlite3_context *pCtx, int nVal, sqlite3_value **apVal){ >int *aMatchinfo;

Re: [sqlite] possible bug "foreign key mismatch" in TCL

2011-07-12 Thread Dan Kennedy
On 07/13/2011 07:18 AM, Victor Mayevski wrote: > I am getting a "foreign key mismatch" in TCL in the following situation: > #The system is Ubuntu 10.10 32bit, using ActiveState 8.6 32 bit TCL binaries > > % package require sqlite3 > 3.7.6.3 > > > #Two example tables: > create table users (name

Re: [sqlite] FTS4 code from the website

2011-07-01 Thread Dan Kennedy
On 06/30/2011 08:55 PM, Ryan Henrie wrote: > Even if I use the stock example from the web page, with only 2 columns, > and the exact schema from the example, I get the same result. > > I'm wondering if it is a bug in the example code on the website (ie the > source code has moved on, invalidating

Re: [sqlite] FTS4 code from the website

2011-06-29 Thread Dan Kennedy
On 06/30/2011 10:31 AM, Ryan Henrie wrote: > Reference Page: http://www.sqlite.org/fts3.html#appendix_a > > At the bottom of the page, there is a sample c file to calculate the > rank, and a FTS query to use it. I can't get it to work. > > You can see my files here: > >

Re: [sqlite] Indexes on columns

2011-06-24 Thread Dan Kennedy
On 06/24/2011 12:26 PM, logan...@gmail.com wrote: > Hello, > > My understanding is that an index is automatically created on any column > that is used in the primary key (or a composite index is created if the key > is composed of different columns). If this is correct then why don't I see >

Re: [sqlite] Sqlite3 WAL (file is encrypted or is not a database, database table is locked, database disk image is malformed') at high load

2011-06-23 Thread Dan Kennedy
queries. > > Any clues on the root cause ? Is this a Sqlite3 WAL bug ? Do you have a program you can share that exhibits this bug? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug in composite foreign key constraints.

2011-06-10 Thread Dan Kennedy
sk image is malformed Thanks. Should be fixed here: http://www.sqlite.org/src/info/2b3d9996a8 Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug in composite foreign key constraints.

2011-06-10 Thread Dan Kennedy
On 06/10/2011 10:33 PM, Max wrote: > I just grabbed a 3.7.6.3 binary from the sqlite page. The second schema > still fails to throw a constraint error. Hopefully fixed here: http://www.sqlite.org/src/info/442d8d8bfe Grab the zip file from the "Zip Archive" link on the

Re: [sqlite] What is so slow on dropping tables?

2011-06-01 Thread Dan Kennedy
On 06/01/2011 02:18 AM, Jan Hudec wrote: > Hellow folks, > > At $work we have an application that processes *huge* (tens of millions of > rows in some of the larger tables, sometimes over 30GiB file size). This > application changes and when it does, it drops some tables and calculates > them

Re: [sqlite] FTS4 reserved characters

2011-06-01 Thread Dan Kennedy
On 06/01/2011 06:30 AM, Mohd Radzi Ibrahim wrote: > Hi, > I was searching for any reference to reserved characters used in FTS4, but > failed to find any. > > I have problem with query with - ftstable match 'width 5" ' > > But it's ok with - ftstable match 'width 5' > > to fix this, I replaces

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Dan Kennedy
On 05/06/2011 05:53 PM, Ole Reinhardt wrote: > Hi Dan, > >>> I have to correct myself a little... the hanging sqlite3_open_v2() does >>> not happe while the prepare of the first query but during the first >>> sqlite3_step() of the first query... >> >

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Dan Kennedy
t is the nature of shared-cache mode. Dan. > > So in pseudo code the database access looks like this: > > first thread: > > sqlite3_open_v2("log.sqlite", SQLITE_OPEN_READONLY | > SQLITE_OPEN_NOMUTEX, NULL); > sqlite3_exec(log_database_local, "PRAGMA rea

Re: [sqlite] Virtual tables and OR clause

2011-05-04 Thread Dan Kennedy
On 05/04/2011 08:58 PM, Schrum, Allan wrote: > Hi Folks, > > Using virtual tables the WHERE clause is broken up and sent to the "best > index" function to determine the best index. Then the "filter" function is > called to perform the actual work. I've noticed that the SQLITE engine seems > to

Re: [sqlite] select * on empty virtual table

2011-04-29 Thread Dan Kennedy
On 04/29/2011 11:15 PM, Joseph Stockman wrote: > > We have tried a null pointer, a zero-length static, a dummy static and > strings created on the heap via sqlite3_mprintf. > All cause the same segmentation fault. Run your app under valgrind. Post the errors it finds if they don't make the

Re: [sqlite] No journal vs WAL journal

2011-04-26 Thread Dan Kennedy
On 04/26/2011 08:13 AM, Nikolaus Rath wrote: > Nikolaus Rath writes: > [ WAL Performance ] >> Really no one an idea of why this is happening? > > I tried to investigate this further myself and created a small example > program (attached). It fills a table with 500,000 entries

Re: [sqlite] Problems while upgrading to 3.7.3

2011-04-21 Thread Dan Kennedy
On 04/21/2011 05:42 PM, Gaurav Srivastava wrote: > Hi > > I have recently upgraded my sqlite version from 3.5.1 to 3.7.3. With the > update I have been seeing some issues with sqlite3_prepare_v2() API. > The workflow here is: > sqlite3VdbeSetSql(pVDbe, zSql, saveSqlflag) > ^ > | >

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-16 Thread Dan Kennedy
On 04/15/2011 05:35 PM, Thomas Klausner wrote: > On Fri, Apr 15, 2011 at 04:32:08PM +0700, Dan Kennedy wrote: >> How are you building sqlite3? Using configure/make from the >> sqlite-autoconf-3070601.tar.gz package on the website? > > Yes, using pkgsrc. What happens if

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-15 Thread Dan Kennedy
On 04/15/2011 04:08 PM, Thomas Klausner wrote: > On Fri, Apr 15, 2011 at 01:42:00PM +0700, Dan Kennedy wrote: >> Are there any other threads in the process? > > My program is not using threads. > sqlite3 is linked against libpthread. I don't think it's using threads &g

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-15 Thread Dan Kennedy
On 04/15/2011 01:32 PM, Thomas Klausner wrote: > On Fri, Apr 15, 2011 at 01:20:11PM +0700, Dan Kennedy wrote: >> Can you post the stack-trace from the core file? With debugging >> symbols if possible. > > Sorry, the backtrace is unusable: > (gdb) bt > #0 __nanosleep50

Re: [sqlite] sqlite-3.7.6.1 coredump/hang

2011-04-15 Thread Dan Kennedy
ing compilation are > -DUSE_PREAD > -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 Could easily be the ENABLE_UNLOCK_NOTIFY. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] FTS4 compress/uncompress functions

2011-04-13 Thread Dan Kennedy
On 04/13/2011 02:49 PM, Alexey Pechnikov wrote: > What type of value return _uncompress_? The original content may be > blob or text, so uncompress may return blob I think... Or we need to > store in compressed field the type of this. I guess that is correct. uncompress() should return the same

Re: [sqlite] FTS4 compress/uncompress functions

2011-04-12 Thread Dan Kennedy
On 04/13/2011 06:22 AM, Alexey Pechnikov wrote: > Which functions will be correct? As example, affinity for uncompress > functions can be as "blob" as "text". Now this is not important but > some tests will be nice for future compability. You mean what type of value should compress() return? Any

Re: [sqlite] User function calculates for every row before applying any where condition

2011-04-11 Thread Dan Kennedy
On 04/11/2011 05:32 PM, Enrico Thierbach wrote: > > On 11.04.2011, at 10:18, Maxim V. Shiyanovsky wrote: > >> Does SQlite (3.6.23.1 to be precise) perform any optimization when user >> function appears in the statement? >> >> I defined custom function MY_FUNC(a TEXT, b TEXT) and bound it with >>

Re: [sqlite] test/exists.test 2.$tn.1 fails if both DBs are in WAL mode

2011-04-10 Thread Dan Kennedy
well if I recreate the database file anew just prior to > running it so it acts upon an empty database. The [do_multiclient_test] is supposed to delete the database file before running the script passed as the third argument (of which this [do_test]

Re: [sqlite] Can't load sqlite 3.75 under tcl 8.4.4.0

2011-04-10 Thread Dan Kennedy
On 04/10/2011 11:43 AM, thoselai...@shaw.ca wrote: > % package require sqlite > couldn't load library "C:/Tcl/lib/sqlite3/sqlite3/.dll": this library or a > dependent library could not be found in library path > > What is sqlite3/.dll ? > Where did that "/" come from? > > The pkgindex file

Re: [sqlite] Disabling a unique index

2011-04-08 Thread Dan Kennedy
uum database? If so, it might be faster if you issue a "PRAGMA auto_vacuum = 2" before dropping the index. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problem with incremental_vacuum and WAL

2011-04-05 Thread Dan Kennedy
ld report corruption. Also, can you try with this patch? http://www.sqlite.org/src/ci/311d0b613d It might help with the 14MB wal files. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] BEGIN DEFERRED TRANSACTION causes core dump in a heavily periodic load with BEGIN EXCLUSIVE/IMMEDIATE TRANSACTION in version 3.7.5

2011-04-05 Thread Dan Kennedy
om "BEGIN DEFERRED TRANSACTION" to "BEGIN EXCLUSIVE > TRANSACTION" in this application, the problem is gone. The core dump report > is shown as below. > > ChingChang > > In frame 3, what do you get for "p *pBt"? And "p *pBt->db"? Dan. &

Re: [sqlite] Full Text Search

2011-03-26 Thread Dan Kennedy
On 03/26/2011 02:18 PM, Sumesh KS wrote: > Hi, > > I am Sumesh, student from india. I currently doing a project using qt > and sqlite. I want to implement Full Text Search in that project. > Anyone please tell me, from where i start to learn FTS and it's > working and how it is implemented.

Re: [sqlite] "transaction" method of the Tcl bindings to SQLite

2011-03-24 Thread Dan Kennedy
On 03/24/2011 07:23 PM, Richard Hipp wrote: > On Wed, Mar 23, 2011 at 7:05 AM, Jean-Marie CUAZ wrote: > >> Hello, >> >> In a Tcl script, is it safe to call the Tcl "_return_" command inside >> and before the end of a multi-statement "_transaction_" method (for >> aborting the

Re: [sqlite] PRAGMA cache_size problem

2011-03-23 Thread Dan Kennedy
AULT_CACHE_SIZE=1048576. > Without issuing the PRAGMA, the memory (cache) size now continues to grow to > match the size of the datafiles as expected. Each attached database has a separate limit. You will need to do: ATTACH 'new.db' AS aux; PRAGMA aux.cache_size = 1048576; or someth

Re: [sqlite] Best approach for xBestIndex/xFilter effectiveness

2011-03-22 Thread Dan Kennedy
On 03/23/2011 01:07 AM, Jay A. Kreibich wrote: > On Tue, Mar 22, 2011 at 06:25:04PM +0700, Dan Kennedy scratched on the wall: > >> SQLite assumes that the result of each expression in the WHERE >> clause depends only on its inputs. If the input arguments are >> the same,

Re: [sqlite] Best approach for xBestIndex/xFilter effectiveness

2011-03-22 Thread Dan Kennedy
On 03/22/2011 04:26 PM, Max Vlasov wrote: > Hi, > > recently I finally started experimenting with virtual tables and there's at > least one thing I can not understand. > > As I see xBestIndex/xFilter were developed to allow fast searching if the > implementation is able to do this. But there's

Re: [sqlite] "Error: disk I/O error" on big databases vacuuming

2011-03-08 Thread Dan Kennedy
On 03/08/2011 11:51 PM, Alexey Pechnikov wrote: > I try to vacuum database about 11Gb size on debian squeeze host with 1,5 Gb > RAM: > > sqlite3 test.db 'vacuum;' > Error: disk I/O error > > Note: any new files does not created on vacuuming process (may be > created journal, does not it?). > >

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] 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] Reason for random names for the master journal?

2011-02-25 Thread Dan Kennedy
-mjMASTER but it cannot, since that file is still in use. We use the random names to get around this problem. You could probably get away with using "-mjMASTER1", "-mjMASTER2" etc. if you wanted to. See the loop around line 1729 of vdbeaux.c. Dan. __

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] 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] foreign key on delete no action

2011-02-16 Thread Dan Kennedy
I better off just leaving the > action blank instead of explicitly writing "on delete no action"? Yes. Good plan. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] FTS slowdown with matchinfo

2011-02-15 Thread Dan Kennedy
> the query takes 7.5 minutes. It seems FTS is getting > stuck calculating the 2nd and 3rd part of the "x" > matchinfo data ("hits all rows" and "docs with hits") > but it's not clear why this should take so long. > Any ideas on what might be causing the

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] 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

[sqlite] Outer query returning results not found in subquery

2011-02-10 Thread Dan Kubb
llapses subqueries, but I'm not sure. Just to reiterate, the above example is simplified from what I'm actually doing. I'm not just using DISTINCT on a subquery that returns a single row, but rather it returns many rows, some of which have the same value for a column hence my need for DISTINCT. The above example is the simplest way I could think of to demonstrate what's happening. -- Thanks, Dan Kubb ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] determine SQLITE_MAX_LENGTH or sql_limit/sqlite3_limit

2011-02-09 Thread Dan Kennedy
ed, the sqlite3_limit() interface returns the prior value of the limit. Hence, to find the current value of a limit without changing it, simply invoke this interface with the third parameter set to -1. Maybe you can use that. Dan. ___ sqlite-users m

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/i

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
to me directly? This mailing list strips out attachments. Dan. > > The "query" is used to change some table structures in the database and > executes the following actions on the database; > BEGIN TRANSACTION; > > ALTER TABLE [A] RENAME TO [TMP_A] > ALTER TABLE [B

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-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
you will find a database file which is not encrypted, and all > tables are dropped. The corruption is still in there and is used to > generate the output mentioned above. I think the mailing list stripped your attachment. Can you put somewhere we can download it from? Or ju

Re: [sqlite] Multithreading problem

2011-02-04 Thread Dan Kennedy
>make > > I have remade my test file ...and it is working well now! > Thanks you very much!!! > > Another question: Why ./configure doesn't set itself this flag when I > use --enable-threadsafe in a Solaris system? A bug I suppose. Will fix it for 3.7.6. Dan.

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] Trigger for incrementing a column is slow

2011-02-03 Thread Dan Kennedy
rofile using the trigger and without. On the version > without, most of the time is spent all in sqlite, as expected. The one with > triggers had a ton more time spent in the various kernel file system > functions (hfs, I'm on Mac OS 10.6.6). So it seems like the triggers ar

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] Multithreading problem

2011-02-03 Thread Dan Kennedy
On 02/03/2011 10:22 PM, Tiberio, Sylvain wrote: > > Dan, > > Thanks for your attention. > > sqlite3_extended_errcode() return 0xA0A that means SQLITE_IOERR_DELETE. Earlier versions of SQLite ignored the return code of unlink(). That is probably why you're not seeing a problem wi

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
.7.5 here. After the IO error in sqlite3_exec(), what value does sqlite3_extended_errcode() return? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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] WAL for single user database on NFS and Solaris

2011-01-30 Thread Dan Kennedy
journal_mode to > delete. If you set "PRAGMA locking_mode=EXCLUSIVE" before reading or writing the WAL-mode database it might work. http://www.sqlite.org/wal.html#noshm Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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] EXTERNAL:Re: SQLite version 3.7.5 - code freeze

2011-01-25 Thread Dan Kennedy
t; > And...while looking at where it's called I noticed > > sqlite3Prepare16 >const void *zSql, /* UTF-8 encoded SQL statement. */ > > sqlite3_prepare16 >const void *zSql, /* UTF-8 encoded SQL statement. */ > > Should be UTF-16 in the comment? Tha

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Dan Kennedy
lue of the integer that the parameter points to. Maybe that is too optimistic an assumption. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite version 3.7.5 - code freeze

2011-01-24 Thread Dan Kennedy
} >return (int)(z-(unsigned char const *)zIn); > } The ( SQLITE_UTF16NATIVE==SQLITE_UTF16BE ) expression is supposed to be constant (for a given architecture). One branch of the "if" condition runs on bit-endian hosts, the other on little-endian. Is that the expression that is causing the warning? Dan. _

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

2011-01-17 Thread Dan Kennedy
As "starttime" is not an aggregate or a part of the GROUP BY clause. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Understanding EXPLAIN QUERY

2011-01-16 Thread Dan Kennedy
ns, but I am only seeing two columns. What do the two columns > mean? Columns 0 and 1 of the old output are the same as columns 1 and 2 of the new output. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/m

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] long running INSERT (up to now ~ 11 hours and still working)

2011-01-11 Thread Dan Kennedy
get away with doing the inserts with foreign keys turned off, it is worth trying. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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] WAL index in memory - multiple connections

2010-12-09 Thread Dan Kennedy
vides). The alternative is to create your own VFS that stores the WAL index in heap memory. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

2010-12-07 Thread Dan Kennedy
ve something to do with the scanning costs your virtual tables are returning to SQLite. Does this happen in 3.7.4? Can you provide us with code for virtual tables that cause the bug to occur? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org

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] 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

<    5   6   7   8   9   10   11   12   13   14   >