Re: [sqlite] SQLite, network share, and Qt

2009-11-16 Thread Dan Kennedy
On Nov 17, 2009, at 2:32 AM, Israel Brewster wrote: > Simple (I hope) question here for my first posting to this list: > Running SQLite 3.4.0 on Mac OS X 10.5.8, should I or should I not be > able to place a SQLite database on a network share and have it work > for a single user? I know there

Re: [sqlite] Asynchronous I/O and shared cache

2009-11-17 Thread Dan Kennedy
On Nov 18, 2009, at 1:25 PM, presta wrote: > > Hello, > > I'm wondering if shared cache and read uncommited isolation level with > asyncronous I/O enabled is possible ? I haven't tried, but I assume it is possible. The two features don't really interact. > In sqlite3async.c I see a shared

Re: [sqlite] Asynchronous I/O and shared cache

2009-11-18 Thread Dan Kennedy
sqlite3_step() will be spent in a single call to sqlite3VdbeExec(), so the effect is similar. Dan. > Pavel > > On Wed, Nov 18, 2009 at 8:40 AM, presta <harc...@gmail.com> wrote: >> >> I'm confused according to Dan Kennedy : >> >> "Each shared-cache ha

Re: [sqlite] behavior of "collate" on views changed from 3.6.2 to 3.6.16 and beyond - intentional?

2009-11-18 Thread Dan Kennedy
On Nov 19, 2009, at 6:40 AM, Vasu Nori wrote: > I am noticing a behavior change in processing of "collate" from > 3.6.2 to > versions 3.6.16 & beyond. > it *could* make sense but I find some inconsistencies.. let me > explain. > > 1. create a simple collation function which compares two

Re: [sqlite] how index stored by fts3

2009-11-19 Thread Dan Kennedy
On Nov 20, 2009, at 10:24 AM, ouwind wrote: > > it used revert index or just index > for example: > i insert some records > 1:"i am a boy" > 2:"i am a girl" > 3:"you are a boy" > > what's the table stores like > option A: id, content > 1, i am a boy > 2, i am a girl >

Re: [sqlite] how index stored by fts3

2009-11-19 Thread Dan Kennedy
; 2009-11-20 > > ----- > 发件人: Dan Kennedy <danielk1...@gmail.com> > 发送时间: 2009-11-20 12:32 > 主 题: Re: [sqlite] how index stored by fts3 > 收件人: General Discussion of SQLite Database us...@sqlite.org> > > &

Re: [sqlite] Difference between two dates fails

2009-11-20 Thread Dan Kennedy
On Nov 20, 2009, at 11:15 PM, g.costa...@email.it wrote: > Hi,why? > > > SELECT ProductID,OrderDate ,DispatchDate, > strftime('%d',tblOrders.DispatchDate) - > strftime('%d',tblOrders.OrderDate) Maybe %J instead of %d. %d is the day of the month. %J is the julian day.

Re: [sqlite] begin transaction

2009-11-23 Thread Dan Kennedy
On Nov 23, 2009, at 9:26 PM, Pavel Ivanov wrote: > According to SQLite sources: > > ** The pager invokes the busy-handler if sqlite3OsLock() returns > ** SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock, > ** or when trying to upgrade from a RESERVED lock to an EXCLUSIVE > **

Re: [sqlite] behavior of "collate" on views changed from 3.6.2 to 3.6.16 and beyond - intentional?

2009-11-24 Thread Dan Kennedy
t;> } >> >> >> add this code to src/main.c. >> in the same file, don't forget to add createCollation() line for >> "TWOCASE" >> - just like the line for "NOCASE". >> >> I tried it on 3.6.2 (works) and 3.6.16 (fails). >> &g

Re: [sqlite] fsync/fdatasync problem on UBIFS

2009-11-26 Thread Dan Kennedy
On Nov 26, 2009, at 12:01 AM, Ronny Dierckx wrote: > Dear list, > > I'm using SQLite 3.6.20 on an ARM Linux device which uses the UBIFS > filesystem (on OneNAND flash). > > When I perform a database update, and cut the power a few seconds > later, the > changes are rolled back > when the

Re: [sqlite] Compiler invariancy

2009-11-27 Thread Dan Kennedy
On Nov 27, 2009, at 6:52 AM, Christo Christoff wrote: > > Hi > I report a prblem when compiling the recent fossil-based sqlite > sources with BorlandC. > ' > sqlite3.c: > Error E2140 sqlite3.c 99710: Declaration is not allowed here in > function fts3TermSelect > *** 1 errors in Compile *** >

Re: [sqlite] Error message from sqlite3_tokenizer_module.xCreate?

2009-12-01 Thread Dan Kennedy
On Dec 1, 2009, at 2:17 PM, Ralf Junker wrote: > On 30.11.2009 20:33, Grzegorz Wierzchowski wrote: >> Monday 30 of November 2009 12:29:10 Ralf Junker napisał(a): >>> I am passing various arguments to >>> sqlite3_tokenizer_module.xCreate. In case >>> they are invalid, I would like to return an

Re: [sqlite] fts3b-4.9 fails - FTS3 docid updates now possible with latest version?

2009-12-02 Thread Dan Kennedy
On Dec 2, 2009, at 3:07 PM, Ralf Junker wrote: > With the latest FTS3 changes, fts3b-4.9 no longer passes. This short > SQL > emulates the test: > > DROP TABLE IF EXISTS t4; > CREATE VIRTUAL TABLE t4 USING fts3(c); > INSERT INTO t4 (docid, c) VALUES (12, 'still testing'); > UPDATE t4

Re: [sqlite] "foreign key mismatch" error

2009-12-03 Thread Dan Kennedy
On Dec 4, 2009, at 12:31 PM, Paul Shaffer wrote: > Below are 3 tables. When I delete a row in Item with related rows in > Item_attribute I get the dreaded "foreign key mismatch" error. I've > read > through the documentation and don't see what I'm doing wrong. There are no FK mismatches in

Re: [sqlite] The next release of SQLite....

2009-12-03 Thread Dan Kennedy
On Dec 4, 2009, at 7:28 AM, John Brooks wrote: > In the new fts3.html, the statement: > > "each FTS3 table has a 'rowid' column that behaves like an INTEGER > PRIMARY KEY, except that values remain unchanged if the database is > rebuilt using the VACUUM command." > > is incorrect; an INTEGER

Re: [sqlite] Better example of fk mismatch problem

2009-12-06 Thread Dan Kennedy
On Dec 7, 2009, at 5:20 AM, Paul Shaffer wrote: > Thanks. Typo is only in my post edit, not in the actual software. > Your edit > is correct. Question still stands. The "parent key" of a foreign key relationship must be the primary key of its table, or else have a UNIQUE constraint on it. The

Re: [sqlite] USING bug

2009-12-09 Thread Dan Kennedy
On Dec 9, 2009, at 3:42 AM, Wiktor Adamski wrote: > SQLite version 3.6.21 > Enter ".help" for instructions > Enter SQL statements terminated with a ";" > sqlite> create table t1(a int); > sqlite> create table t2(a int); > sqlite> create table t3(a int, b int); > sqlite> insert into t1 values(1);

Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Dan Kennedy
On Dec 10, 2009, at 11:19 AM, Daniel Mierswa wrote: > On 10.12.2009 01:22, Shawn Wilsher wrote: >> See https://bugzilla.mozilla.org/show_bug.cgi?id=533171 (this isn't >> really a >> SQLite issue). > I'm not sure what you mean. I can reproduce it without any Thunderbird > code involved at all.

Re: [sqlite] BUG: The FTS3 is broken in reliase 3.6.21

2009-12-10 Thread Dan Kennedy
On Dec 10, 2009, at 1:13 PM, Alexey Pechnikov wrote: > Hello! > > In new relise doesn't some queries. The simplest non-working query > is like to: > > sqlite> select 1 from file_text where rowid=1 and file_text match > 'document'; > Error: SQL logic error or missing database > > sqlite>

Re: [sqlite] BUG: FTS3 in 3.6.21

2009-12-18 Thread Dan Kennedy
My apologies to the list if this is a dup. I think this message was dropped the first time I sent it. > >> Hello! >> > > >> sqlite> select count(*) from file_text where file_text match >> 'content:мтс-коннект'; >> 162 >> sqlite> select count(*) from file_text where file_text match >>

Re: [sqlite] custom fts3 tokenizer, used in read-only?

2009-12-18 Thread Dan Kennedy
On Dec 17, 2009, at 3:08 AM, Nick Hodapp wrote: > > Ah, Thanks. That makes sense. > > My tokenizer extracts text-node values from XHTML content and > delegates the > tokenizing of each node value to the Porter tokenizer. Since the > RHS of the > MATCH operator will never be XHTML, I should

Re: [sqlite] valgrind report (uninitialized byte) while committing large transaction

2009-12-18 Thread Dan Kennedy
On Dec 17, 2009, at 2:35 AM, Vincent Cridlig wrote: > Hi, > > > > I am seeing the valgrind error below using sqlite 3.6.18. It seems > to always > happens while committing a transaction having 100 INSERT(s). all > INSERT are > done in one single table. > > Is this a known issue? At first

Re: [sqlite] FTS3 performance rowid vs docid

2009-12-20 Thread Dan Kennedy
On Dec 18, 2009, at 10:53 PM, Eric Grange wrote: > Hello All, > > Using 3.6.21 and FTS3, I've noticed than when doing search queries, > using docid as in > > select fts.docid from fts where fts.content match "la" > > the search is much slower than when using rowid as in > > select fts.rowid

Re: [sqlite] sqlite3_prepare_v2

2009-12-24 Thread Dan Kennedy
On Dec 24, 2009, at 5:46 PM, Nick Shaw wrote: > I'd suggest having your own sqlite3.dll in your own application's > working folder, rather than relying on an existing version somewhere > on the PC already which could be any version! > > If you created your own DLL, why would you then want to

Re: [sqlite] A question

2009-12-25 Thread Dan Kennedy
On Dec 25, 2009, at 1:45 AM, wrote: > Hey Dan, > Please be patient with my English. I wonder if you would like to > tell me what > I am doing wrong. I use Borland C++ Builder 3.0, but it seems > impossible to me > to get sqlite3

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-28 Thread Dan Kennedy
> If you want the data for other purposes, you could almost implement a > hack to get is. For instance, "SELECT count(docid) FROM fts_table > WHERE fts_table MATCH 'x';" is kind of close, and you could change the > match to handle prefix stuff. Unfortunately, the fts vtable cursor > sets up a

Re: [sqlite] fts3 issue with tokenizing of content during a query

2009-12-29 Thread Dan Kennedy
On Dec 30, 2009, at 6:25 AM, Nick Hodapp wrote: > Hi - > > I'm using sqlite 3.6.21 with this > patch >, > which I found in this forum a few weeks ago. I'm also using a custom > tokenizer which I wrote. > > My scenario is

Re: [sqlite] BUG Report on sqlite 3.6.20 "Error in SQL parser between sqlite3.3.4 and sqlite3.6.20"

2009-12-29 Thread Dan Kennedy
On Dec 30, 2009, at 4:52 AM, Wilson, Ronald wrote: > I get the same error in 3.6.18, so probably the same solution > applies in 3.6.20. I got the query to work with a sub-select. Changed between 3.6.6 and 3.6.7 from the looks of things. > > SQLite version 3.6.18 > Enter ".help" for

Re: [sqlite] BUG REPORT: 3.6.21;

2010-01-04 Thread Dan Kennedy
On Jan 5, 2010, at 6:25 AM, Noah Hart wrote: > Using the command line tools from the website > 3.6.18 reports the error correctly; > > SQLite version 3.6.18 > sqlite> PRAGMA recursive_triggers = on; > sqlite> CREATE TABLE t5 (a primary key, b, c); > sqlite> INSERT INTO t5 values (1, 2, 3); >

Re: [sqlite] temp directory?

2010-01-07 Thread Dan Kennedy
On Jan 8, 2010, at 2:45 AM, Kris Groves wrote: > FYI, in a previous posting, I discovered that even if you set > temp_store > to memory only, you still need a temp_store_directory that is > writable. > I can't recall specifically, but there is one temp file that is > always > on disk

Re: [sqlite] Writes during sleep of backup_step

2010-01-13 Thread Dan Kennedy
On Jan 13, 2010, at 10:27 AM, Jean-Christophe Deschamps wrote: > I've finally implemented the backup API and it works like a charm > except on an important point. > The example given on the site clearly says: > > "If another thread writes to database connection pDb while this > function is

Re: [sqlite] SQL syntax diagrams

2010-01-15 Thread Dan Kennedy
On Jan 15, 2010, at 9:10 PM, Andy Gibbs wrote: > > Hi, > > I really like the way the SQL syntax diagrams are done (e.g. at > http://www.sqlite.org/syntaxdiagrams.html) > . What software did you use for it? http://wiki.tcl.tk/21708 > > Regards > Andy >

Re: [sqlite] fastest way to get the min/max

2010-01-20 Thread Dan Kennedy
On Jan 21, 2010, at 1:54 AM, Pavel Ivanov wrote: >> Why the difference in search time between searching individually and >> searching together? > > Apparently SQLite is not smart enough to optimize the search for both > min and max to make double entrance to the index - first from the >

Re: [sqlite] Possible memory-leaks in shell / FTS3

2010-01-22 Thread Dan Kennedy
On Jan 22, 2010, at 10:21 PM, wcl...@gfs-hofheim.de wrote: > Hi, > > I've spotted a very few places where the use of realloc or > sqlite3_realloc > *may* constitute memory leaks if the realloc fails. Hope this helps; > please ignore if I've misread the code... > > Line numbers should

Re: [sqlite] Crash inside sqlite3_step

2010-01-25 Thread Dan Kennedy
On Jan 26, 2010, at 6:16 AM, Kavita Raghunathan wrote: > Following Sql query crashes in allocateCursor inside of sqlite3_step > > INSERT INTO EntityTbl (AttrName, AttrEnum, AttrType, AttrValue, > ReadWrite, Entity_id) VALUES(‘image_crc’, 6008, 16, ‘0’, 1, 34013184); > > I’m not able to get an

Re: [sqlite] Append data to a BLOB field

2010-01-26 Thread Dan Kennedy
On Jan 26, 2010, at 4:15 PM, cp wrote: > I'd like to be able to append some data to a binary field (BLOB) > without reading the original data, concatenating it, and then setting > it all back. Is this possible? Append is not possible. But if you preallocate space using zeroblob() or similar,

Re: [sqlite] what are the limitations for IN() lists?

2010-01-26 Thread Dan Kennedy
On Jan 26, 2010, at 7:41 PM, Tim Romano wrote: > Thanks for the reply, Simon, and the suggestion. You asked if there > was > a problem with creating a TEMP table. I was disinclined to use a > joined > temporary table instead of the IN-list for several reasons. > > First and foremost, it is a

Re: [sqlite] what are the limitations for IN() lists?

2010-01-28 Thread Dan Kennedy
On Jan 28, 2010, at 10:26 PM, Tim Romano wrote: > Thanks for this clarification. > > Wouldn't SQLite simply rewrite my IN-list query, transparently, as an > equijoin against a transient table that has been populated with the > values in the IN-list? I don't understand why the IN-list should

Re: [sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-28 Thread Dan Kennedy
On Jan 29, 2010, at 1:17 PM, Joost wrote: > Hi all, > > at first i want to say a big "Thank you" to all sqlite developers. > Using > sqlite with Python since 4 years i always (when suited) announce > sqlite > in my examples for great open source software - indeed i see it as > one > of

Re: [sqlite] what are the limitations for IN() lists?

2010-01-29 Thread Dan Kennedy
On Jan 29, 2010, at 8:10 PM, Tim Romano wrote: > Dan, > Thanks for that detail about the b-tree for IN-list queries. When I > examine a query plan for a query like the one below: > > explain query plan > select * from title where id IN(10,20,30,40) > > the plan indicates that an index is used

Re: [sqlite] Bug Report

2010-01-30 Thread Dan Kennedy
> RecNo cid name typenotnull dflt_value pk > - --- -- --- --- -- -- >1 0 ID CHAR(32)0 (null) 0 >2 1 Active BOOLEAN 0 (null) 0 >3 2 Name VARCHAR(64)

Re: [sqlite] Having trouble with "Update"

2010-02-03 Thread Dan Kennedy
On Feb 4, 2010, at 5:20 AM, Ron Hudson wrote: > Pavel Ivanov wrote: >> String constants should be enclosed in single quotes. Double quotes >> are for identifiers. So in your case you make perfectly legal no-op >> action - update field R with value of field R, i.e. leave field R >> unchanged. >>

Re: [sqlite] Change in index optimizer bug with FTS3 between 3.6.21 and 3.6.22?

2010-02-05 Thread Dan Kennedy
On Feb 5, 2010, at 6:03 AM, Nasron Cheong wrote: > Not sure if this is intentional, but it looks like the wrong index > is being > selected on fts tables when a rowid is involved. > > Given a table: > > CREATE VIRTUAL TABLE MessagesFts USING fts3(Message); > > Explain query plan using sqlite

Re: [sqlite] How to discover the state of a statement

2010-02-05 Thread Dan Kennedy
On Feb 5, 2010, at 8:09 PM, Israel Lins Albuquerque wrote: > I want to now if a statement are in a valid row. I think the test is (sqlite3_data_count(pStmt)>0). http://www.sqlite.org/c3ref/data_count.html ___ sqlite-users mailing list

Re: [sqlite] Foreign keys and Temp Tables

2010-02-08 Thread Dan Kennedy
On Feb 9, 2010, at 8:54 AM, Paul Vercellotti wrote: > > > Hi there, > > Are there any restrictions in SQLite on foreign key references in > temporary tables? Is referential integrity enforced between temp > tables and persistent ones? (That is, does the referential integrity > checking

Re: [sqlite] FTS3 segfaults and performance problems in the SQLite 3.6.22

2010-02-09 Thread Dan Kennedy
On Feb 10, 2010, at 2:47 AM, Alexey Pechnikov wrote: > Hello! > > 1. The first query is 10x slower! But the performance may be very > similar in theory: > === > sqlite> select snippet(file_text) from file_text where rowid=9737 > and file_text match 'london'; > ... > CPU Time: user

Re: [sqlite] very simple update query failure...

2010-02-11 Thread Dan Kennedy
On Feb 11, 2010, at 12:08 PM, jflaming wrote: > > I'm new to SQLITE. > I'm trying to update a series of text entries for book titles that > were > entered with underscores. I want to convert them to spaces. > I can run the query: > > select replace(title, '_', ' ') from books; > > and see the

Re: [sqlite] Strange sqlite behaviour when calling from C

2010-02-16 Thread Dan Kennedy
On Feb 16, 2010, at 7:30 AM, Erik de Castro Lopo wrote: > Erik de Castro Lopo wrote: > >> Hi all, >> >> I've got some relatively simple code that does a query and then >> does the following: >> >>const char *stmt = "DELETE FROM connect WHERE machine = 'xxx';" ; >> >>printf ("Before :

Re: [sqlite] Crash in Rtree

2010-02-16 Thread Dan Kennedy
On Feb 16, 2010, at 4:30 PM, Dair Grant wrote: > > Hi, > > I think I have run into a crashing bug in the Rtree module, > triggered by > changing the database page size. Thanks for working this out. A new version of rtree.c with the fix included is here:

Re: [sqlite] SQLite 3.6.22 ATTACH no longer works for files outside the current working directory

2010-02-16 Thread Dan Kennedy
On Feb 15, 2010, at 11:36 PM, Hick Gunter wrote: > In SQLite 3.5.9 it used to be possible to write > > sqlite> ATTACH '/some/unix/file/name.db' AS mydb; > > > In SQLite 3.6.22 this results in the error message > > Error: unable to resolve operation I don't think the above is an SQLite error

Re: [sqlite] File locking to harsh?

2010-02-19 Thread Dan Kennedy
On Feb 18, 2010, at 11:44 PM, Ian Jackson wrote: > Marian Aldenhoevel writes ("[sqlite] File locking to harsh?"): >> ~ # sqlite3 /test "create table A (B integer);" >> Error: database is locked >> >> An strace of that command is attached. The problem surfaces here, I >> think: >> >>

Re: [sqlite] Diagrams and ROLLBACK TO

2010-02-26 Thread Dan Kennedy
> "Instead of cancelling the transaction, the ROLLBACK TO command > restarts the transaction again at the beginning. All intervening > SAVEPOINTs are cancelled, however." > > Say we have the following events: > > begin > insert > update > savepoint A > update > savepoint B > insert > delete >

Re: [sqlite] dynamic typing misunderstanding

2010-03-01 Thread Dan Kennedy
On Mar 1, 2010, at 6:08 PM, Alexey Pechnikov wrote: >> It would seem to me that asking [1='1'] *should* return false >> because the >> numeric and character string value domains are logically disjoint, >> so no value >> from one could ever equal a value from another, and so SQLite's >>

Re: [sqlite] possible buffer over-read in sqlite3VXPrintf()

2010-03-02 Thread Dan Kennedy
On Mar 2, 2010, at 6:54 PM, Jonathan Kew wrote: > I've run into what appears to be a small bug in this function (from > sqlite3.c, v 3.6.22). Suggested patch: > > diff --git a/sqlite3.c b/sqlite3.c > --- a/sqlite3.c > +++ b/sqlite3.c > @@ -16938,17 +16938,17 @@ SQLITE_PRIVATE void

Re: [sqlite] Maximum database size?

2010-03-03 Thread Dan Kennedy
On Mar 3, 2010, at 12:57 PM, Collin Capano wrote: > Hello SQLite users, > > I've been running into some disk I/O errors when doing things such as > vacuuming and/or inserting things into temp tables in a database. The > databases that are giving me trouble are quite large: between 29 and > 55GB.

Re: [sqlite] FTS3 bug with MATCH plus OR

2010-03-03 Thread Dan Kennedy
On Mar 3, 2010, at 6:26 PM, Ralf Junker wrote: > The recent changes to FTS3 fixed a long standing problem with MATCH > and > AND operators combined. Take this schema: > > drop table if exists myfts; > create virtual table myfts using fts3 (a); > insert into myfts values ('one'); > insert into

Re: [sqlite] possible buffer over-read in sqlite3VXPrintf()

2010-03-04 Thread Dan Kennedy
>> Shouldn't escarg[] contain a nul-terminated string? > > Yes, I wondered that too when I looked at it again later. In which > case the code ought to be safe. > But if it's true that escarg[] should always be a nul-terminated > string (are you confident of this? I haven't studied the code

Re: [sqlite] Fastest concurrent read-only performance (+ threads vs processes)

2010-03-04 Thread Dan Kennedy
On Mar 5, 2010, at 12:50 AM, Luke Evans wrote: > Hi SQLiters, > > We're currently investigating SQLite in an application that needs to > issue a batch of queries (SELECTs) before doing some work with all > the data returned. > > I have been trying to figure out the fastest way to get the >

Re: [sqlite] Porting Sqlite to MQX Operating system

2010-03-05 Thread Dan Kennedy
> > http://old.nabble.com/file/p27792715/stack.jpg > > I know its a long shot but does Dr Hipp or anyone have any possible > ideas > what could give rise to a premature file close ? Sorry my message > was so > long. Thanks for any ideas SQLite thinks it is closing the statement journal here,

Re: [sqlite] sqlite3 delete does not delete everything?

2010-03-11 Thread Dan Kennedy
On Mar 11, 2010, at 11:13 PM, Skand wrote: > > Hi Folks, > > Whats going on here? I would expect the following delete to delete > everything under 99. > > sqlite> .schema > > CREATE TABLE ip_domain_table (ip_domain TEXT, answer TEXT, ttl > INTEGER, > PRIMARY KEY(ip_domain, answer,

Re: [sqlite] FTS3 (Version 2 .6.23) - Is the boolean operator "AND" no more available?

2010-03-15 Thread Dan Kennedy
On Mar 14, 2010, at 5:34 AM, gerard.jouannot wrote: > Hello all SQLlite users. > > I wonder if the operator "AND" (in capitals letters) is yet > available and > different from the basic term "and" (in lower letters). Available only if FTS3 is compiled with this option:

Re: [sqlite] Porting Sqlite to MQX OS: Question 2

2010-03-15 Thread Dan Kennedy
On Mar 15, 2010, at 10:04 PM, GeoffW wrote: > > Hi Kees > > Thanks for the response and giving me a clue to look at dot locking, > I had > missed the dot lock mechanism as I had concentrated mainly on the > osWin.c > file. I cant find any documentation other than the source code on > how

Re: [sqlite] Porting Sqlite to MQX OS: Question 2

2010-03-15 Thread Dan Kennedy
On Mar 16, 2010, at 5:22 AM, GeoffW wrote: > > Hello Dan > > Thanks for your useful input. To answer your questions. > >> Do you have any file-locking primitives provided by the OS? > There are no file locking OS Primitives at all that I can use. > >> Do you have clients connecting to the

Re: [sqlite] Result_* functions

2010-03-17 Thread Dan Kennedy
On Mar 18, 2010, at 6:40 AM, Jean-Christophe Deschamps wrote: > Is it allowable/safe to invoke more than once any sqlite3_result_*() > function? In other terms, subsequent invokation of any result > function > will it harmlessly override a previous one? Yes and yes.

Re: [sqlite] R*Tree and sqlite3_last_insert_rowid() API - possible bug?

2010-03-19 Thread Dan Kennedy
On Mar 19, 2010, at 11:04 PM, Minář Petr wrote: > Hi, > I was experimenting a bit with R*Tree extension in my project and I > encountered weird behavior. Consider following code: > > CREATE VIRTUAL TABLE table USING rtree > ( > Id INTEGER NOT NULL PRIMARY KEY, > MinXREAL,

Re: [sqlite] R*Tree and sqlite3_last_insert_rowid() API - possible bug?

2010-03-21 Thread Dan Kennedy
On Mar 22, 2010, at 4:16 AM, Wanadoo Hartwig wrote: > Hi Minar, hi Dan, > > there is a similar bug in the FTS3 module. But here the > sqlite_last_rowid may return a wrong value. How do we reproduce this bug? Dan. ___ sqlite-users mailing list

Re: [sqlite] regression in FTS3 offsets function in 3.6.23

2010-03-24 Thread Dan Kennedy
On Mar 24, 2010, at 7:24 PM, Andrew Sutherland wrote: > > > As reported on https://bugzilla.mozilla.org/show_bug.cgi?id=551260#c17 > The binaries used below were all downloaded from sqlite.org. > > $ cat fts3-offsets-asplode.sql > CREATE VIRTUAL TABLE ft USING fts3(tokenize=porter, fulltextOne,

Re: [sqlite] BUG: Sqlite 3.6.23. Optimizer does not use indexes when a table is joined with a fts3 table

2010-03-27 Thread Dan Kennedy
> ### PROBLEM > > With Sqlite 3.6.17 the following query executes in 12ms. > > --- > SELECT a.number > FROM a, fts > WHERE > a.number=fts.docid > ORDER BY a.date desc > LIMIT 20 > --- > > > With Sqlite version 3.6.23 the same

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-28 Thread Dan Kennedy
On Mar 29, 2010, at 10:48 AM, P Kishor wrote: > On Sun, Mar 28, 2010 at 10:45 PM, Roger Binns > wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> sub sk79 wrote: >>> How So? Is SQLite getting a high concurrency module from BDB in >>> exchange for its SQL

Re: [sqlite] sqlite bug with collating sequences?

2010-03-29 Thread Dan Kennedy
On Mar 29, 2010, at 4:55 PM, Rickard Utgren wrote: > I've managed to break a database, and I think it's related to defining > new text collating sequences in Tcl. If I run "VACUUM" on it, it works > fine again. I was told that this would likely be a bug in SQLite. This database was created with

Re: [sqlite] Sqlite3 crashing on multithreaded program

2010-03-30 Thread Dan Kennedy
On Mar 30, 2010, at 7:37 PM, Periasamy, Karthikeyan wrote: > Hi, > > Our application is a multithreaded program running on Powerpc e300 > mpc8343 embedded board. There are 8 threads running which are > querying and updating DB parallelly and continuously. We are using > libdbi-0.8.2 and

Re: [sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Dan Kennedy
On Mar 30, 2010, at 6:29 PM, Alexey Pechnikov wrote: > Hello! > > CREATE TABLE test ( > id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL > ); > CREATE VIEW view_test as select * from test; > CREATE TRIGGER view_test_insert instead of insert on view_test > begin > insert into test (id) values

Re: [sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Dan Kennedy
On Mar 30, 2010, at 8:53 PM, Pavel Ivanov wrote: >> The segfault is now fixed here: >> >> http://www.sqlite.org/src/info/ca359a3e80 > > Does the comment to commit mean that in the same test case if view has > no triggers then compilation of the statement will still segfault? No.

[sqlite] Fwd: Sqlite3 crashing on multithreaded program

2010-03-31 Thread Dan Kennedy
Begin forwarded message: > From: "Periasamy, Karthikeyan" > Date: March 31, 2010 7:52:55 PM GMT+07:00 > To: "danielk1...@gmail.com" > Subject: Re: [sqlite] Sqlite3 crashing on multithreaded program > > Hi, > > Thanks for your reply. > > In

Re: [sqlite] bug: output contains values of a column not listed in SELECT

2010-03-31 Thread Dan Kennedy
On Mar 31, 2010, at 10:23 AM, Kirill Simonov wrote: > Hi, > > I encountered a weird bug. My query has the form > SELECT col_x, ... FROM my_table ... GROUP BY 1 > but the output of the query looks as if it was produced by a query of > the form > SELECT col_y, ... FROM my_table ... GROUP

Re: [sqlite] Table is locked error

2010-04-01 Thread Dan Kennedy
On Apr 1, 2010, at 2:39 PM, Radovan Antloga wrote: > I did not find any info about my situation in page > http://www.sqlite.org/lockingv3.html > > I would just like a confirmation if this is expected > behaviour. > > I have locking mode = normal. Steps are: > > 1. open database > 2. open

Re: [sqlite] Exposing sqlite3BtreeCommitPhaseOne

2010-04-06 Thread Dan Kennedy
> Currently if an interrupt > arrives during a long commit I have no way to know whether the commit > was successful, and thus whether to commit or roll back the filesystem > journal. Maybe you can read the database to see if the new data is there in this scenario. > If I could flush the dirty

Re: [sqlite] Lemon parser

2010-04-06 Thread Dan Kennedy
On Apr 7, 2010, at 3:23 AM, Chris verBurg wrote: > Hehe, okay, here I go. :) > > > I'm trying to replace an existing flex/bison parser with an re2c/lemon > parser, but I'm running into a methodological problem. I have a > hypothetical grammar like this: > > file ::= FOO str . > file ::= BAR

Re: [sqlite] copy one row to another

2010-04-07 Thread Dan Kennedy
On Apr 8, 2010, at 4:33 AM, P Kishor wrote: > On Wed, Apr 7, 2010 at 4:24 PM, Pavel Ivanov > wrote: >>> I get a "Error: constraint failed". I have no constraint other than >>> INTEGER PRIMARY KEY on id. >> >> You should have something other than integer primary key,

Re: [sqlite] Concurrency for in-memory scenarios

2010-04-08 Thread Dan Kennedy
On Apr 8, 2010, at 3:38 PM, Kent Boogaart wrote: > BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; > }Thanks to all respondents. > A RAM disk is a good idea, but would require me to jump through too > many hoops to get it approved. Corporate environment, you see :( > For now,

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Dan Kennedy
On Apr 10, 2010, at 1:51 AM, Adam DeVita wrote: > Is this a 1 off import? If so, perhaps the command line tool > can .read it. > > On Fri, Apr 9, 2010 at 2:13 PM, Shaun Seckman (Firaxis) < > shaun.seck...@firaxis.com> wrote: > >> Greetings, >> >> I've got a .SQL file that contains multiple

Re: [sqlite] Index not used in simple look-up-value query

2010-04-13 Thread Dan Kennedy
On Apr 14, 2010, at 1:05 AM, wrote: > Hello, > > I have a question regarding the query-optimizer. I've tested SQLite > with the following situation: > > 1 table defined as > > CREATE TABLE MyTable (ElementID INTEGER CONSTRAINT ElementID_PK > PRIMARY KEY

Re: [sqlite] Index not used in simple look-up-value query

2010-04-15 Thread Dan Kennedy
icated one. Would the > returning type matter in the overall execution of these look-ups? > > Thanks! > > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org > ] On Behalf Of Dan Kennedy > Sent: Tuesday, April 13, 2010 2

Re: [sqlite] Is there any memory leak in the code ?

2010-04-23 Thread Dan Kennedy
On Apr 23, 2010, at 2:34 PM, liubin liu wrote: > > Is there any memory leak in the code? The buffers returned by sqlite3_mprintf(). ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] page_size

2010-04-25 Thread Dan Kennedy
On Apr 26, 2010, at 11:09 AM, Tom Broadbent wrote: > > thanks for the replies. > > understood. i was informed that our underlying (EMMC??) FS will do > this w/ FS pages, i.e. read the entire 256k FS page, modify some > small portion of it, and write it out again. i'm higher in the >

Re: [sqlite] releasing EXCLUSIVE lock after writing dirty pages from the memory cache into the DB ?

2010-04-28 Thread Dan Kennedy
On Apr 28, 2010, at 10:20 PM, Guillaume Duranceau wrote: > Hello all, > > While running a SQLite transaction writing into the DB (thus holding > the > RESERVED lock), in case the memory cache becomes full, SQLite will > try to > write the content of a dirty page into the DB. To do so, it

Re: [sqlite] Reusing stmt and erroneous constraint failure

2010-04-30 Thread Dan Kennedy
Now fixed here: http://www.sqlite.org/src/ci/f660be615a For those playing at home, this is an example of how to write a great bug report. Clear, concise explanation and a self-contained minimal example. Dan. On Apr 30, 2010, at 8:51 AM, Roger Binns wrote: > -BEGIN PGP SIGNED

Re: [sqlite] I don't understand locking

2010-05-05 Thread Dan Kennedy
On May 5, 2010, at 8:32 PM, myomancer wrote: > Dear Users > > I've spent hours reading various web-based documents, examined lots of > code snippets, written some code of my own, but I still patently do > not understand SQLite locks. 4th paragraph of this page (The presence of a busy...)

Re: [sqlite] DB files are different between PC side and instrument side.

2010-05-11 Thread Dan Kennedy
On May 11, 2010, at 2:54 PM, Lei, Rick (GE EntSol, SensInsp) wrote: > > Hi, > > I ported Sqlite3 to my instrument. The database file is stored in a > SDHC > card. Sqlite3 runs ok. However I found the database file generated on > instrument side is much bigger than the file on PC side. I

Re: [sqlite] Can an online backup happen during a nested transaction?

2010-05-11 Thread Dan Kennedy
On May 12, 2010, at 2:53 AM, Shaun Seckman (Firaxis) wrote: > Hello, > >I'm attempting to save a backup of my in-memory > database > using the online backup routines. I noticed that I cannot seem to > make > backups of the database when there is a pending save point. The

Re: [sqlite] sqlite3_prepare_v2 && SQLITE_BUSY

2010-05-17 Thread Dan Kennedy
On May 18, 2010, at 10:18 AM, Sam Carleton wrote: > For those of you following along my life (which I hope none of you > are), I > am working on cleaning up my code to handle SQLITE_BUSY correctly. > The > first issue I think I just successfully overcame was how to lock the > DB to > get

Re: [sqlite] Begin immediate transaction -> SQLITE_BUSY (database is locked)

2012-10-19 Thread Dan Kennedy
On 10/18/2012 09:05 PM, Pavel Ivanov wrote: On Thu, Oct 18, 2012 at 6:32 AM, Daniel Polski wrote: The SELECT statement, including the _prepare() stage and all the _step()s until you've reached the last row, and then the _finalize(), is all one process. They're all part

Re: [sqlite] transaction commit is successful despite I/O error

2012-10-20 Thread Dan Kennedy
On 10/20/2012 09:14 PM, Simon Slavin wrote: On 19 Oct 2012, at 9:40pm, Efim Dyadkin wrote: You are right about the purpose of unlink but it is out of context. There are a transaction in progress and hot journal on disk. If journal can't be deleted by the end of

Re: [sqlite] CREATE INDEX is 13 times slower with 3.7.14.1 than with 3.6.22

2012-10-21 Thread Dan Kennedy
Am 18.10.2012 16:49, schrieb Dan Kennedy: On 10/18/2012 03:32 PM, Imanuel wrote: Ok, here it is (45mb): http://www.file-upload.net/download-6707980/CREATE_INDEX_test.7z.html On Linux here 3.6.22 takes around 61 seconds. Against 23 for a new version. Are you able to reproduce the performance

Re: [sqlite] Transaction inside transaction

2012-10-21 Thread Dan Kennedy
On 10/22/2012 11:34 AM, Igor Korot wrote: Hi, ALL, Is it possible to have transaction inside transaction? Will it be handled correctly? What I mean is: crate transaction 1 by issuing "BEGIN", create transaction 2 by issuing "BEGIN". Close transaction 2 by issuing either "COMMIT" or "ROLLBACK".

Re: [sqlite] FTS returns out of memory when use NEAR and OR

2012-10-24 Thread Dan Kennedy
On 10/24/2012 11:07 PM, Vlad Seryakov wrote: Hello For some time already i noticed that when i use NEAR/1 and OR in one query like SELECT * FROM search WHERE search MATCH 'tom NEAR/1 hanks or tom hanks' Are you able to share the database file that you use to reproduce this? Thanks. Dan.

Re: [sqlite] I/O error on creating index with 3.7.14

2012-10-26 Thread Dan Kennedy
On 10/26/2012 12:14 PM, Jamie Norrish wrote: Using 3.7.14, when creating an index on a 27G database (on the table that contains almost all of the data), I consistently (on Windows XP and Debian GNU/Linux, on three different machines) get a disk I/O error. This does not happen using 3.7.13 (only

Re: [sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-26 Thread Dan Kennedy
On 10/27/2012 07:06 AM, Simon Slavin wrote: On 26 Oct 2012, at 11:05pm, Clemens Ladisch wrote: Yes; sqlite3_finalize _always_ frees the statement. And if the statement is already finalized (due to an earlier error, perhaps) then it is a harmless noop. So you can do it

Re: [sqlite] Calling "ROLLBACK" outside transaction

2012-10-28 Thread Dan Kennedy
On 10/29/2012 07:35 AM, Igor Korot wrote: Hi, ALL, Will I be punished if I call ROLLBACK outside transaction? No. You will be rewarded with an error code though. To check if an SQLite connection has an open write-transaction: http://www.sqlite.org/c3ref/get_autocommit.html Dan.

Re: [sqlite] FTS substring behavior

2012-11-08 Thread Dan Kennedy
On 11/09/2012 01:49 AM, Paul Vercellotti wrote: Hi there, I wanted to clarify if FTS could provide any optimization for substring matches like '*ion*' or similar? No. I think it will actually search for tokens that start with the 4 ASCII characters "*ion" if you try that. Dan.

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