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 sqli

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

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 th

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

2010-03-14 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: -DSQLITE_ENABLE_FTS3

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, ttl))

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

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

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

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

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: >> >> open("/test

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 mess

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: http://www.sqlite.org/src/raw/ext/rt

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 : %s\n

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

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 ta

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 sqlite-users

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 3.

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

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 (t

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 the

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 hav

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

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 u

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 correlate

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

Re: [sqlite] rtree_i32

2010-01-18 Thread Dan Kennedy
On Jan 19, 2010, at 2:44 AM, martin goodson wrote: > Hi > I found the messages on this forum giving the advice to use rtree_i32 > in order to make use of integer coordinates. This is very important > for the uptake of rtree among the bioinformatics community. Has it > been announced whether this

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

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 regar

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); > sqli

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 instruc

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 th

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 ful

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 up and running. I have included the sqlite3.c file in > my

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

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 gla

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

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

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 the

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 SE

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 e

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

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). >> >> thank

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 > ** lock

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. http://www.sqlite.org/

Re: [sqlite] how index stored by fts3

2009-11-19 Thread Dan Kennedy
; 2009-11-20 > > ----- > 发件人: Dan Kennedy > 发送时间: 2009-11-20 12:32 > 主 题: Re: [sqlite] how index stored by fts3 > 收件人: General Discussion of SQLite Database us...@sqlite.org> > > > > On Nov 20, 2009, at 10:24 AM,

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

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

2009-11-18 Thread Dan Kennedy
t in 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 wrote: >> >> I'm confused according to Dan Kennedy : >> >> "Each shared-cache has its own

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 mutex

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 cou

Re: [sqlite] BUG (?) foreign_keys=on/off within a transaction

2009-11-14 Thread Dan Kennedy
On Nov 14, 2009, at 11:34 PM, Uwe Sander wrote: > Hi, > the documentation states that ALTER TABLE ... RENAME ops do not > update the > name of a referenced table if foreign_keys=off has been set > previously. This > is only true if no enclosing transaction exists, otherwise > foreign_keys=o

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Dan Kennedy
On Nov 12, 2009, at 4:36 PM, Artur Reilin wrote: > I also wonder, why the analyzer isn't working. I doesn't work for me. In what respect is it malfunctioning? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Dan Kennedy
On Nov 12, 2009, at 3:01 PM, Jens Miltner wrote: > > Am 11.11.2009 um 17:45 schrieb D. Richard Hipp: > >> >> On Nov 11, 2009, at 11:24 AM, Jens Miltner wrote: >>> >>> Is sqlite3_analyzer supposed to work in 3.6.19? >>> >> >> >> No. sqlite3_analyzer has been busted for a long time. But the 3.6.0

Re: [sqlite] Bug candidate: virtual tables vs. external db connections

2009-11-11 Thread Dan Kennedy
On Nov 12, 2009, at 11:31 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Grzegorz Wierzchowski wrote: >> That was my first suspicion that there is some memmove with cursor >> object or so. >> This would mean that sqlite* or maybe other sensitive pointers can >> n

Re: [sqlite] sqlite3 for Mac OSX 10.5

2009-11-11 Thread Dan Kennedy
On Nov 11, 2009, at 12:13 PM, Jay A. Kreibich wrote: > On Wed, Nov 11, 2009 at 11:23:18AM +0700, Dan Kennedy scratched on > the wall: >> >> On Nov 11, 2009, at 4:07 AM, Peter Haworth wrote: >> >>> sqlite3 is rejecting a SELECT statement that includes the >

Re: [sqlite] sqlite3 for Mac OSX 10.5

2009-11-10 Thread Dan Kennedy
On Nov 11, 2009, at 4:07 AM, Peter Haworth wrote: > sqlite3 is rejecting a SELECT statement that includes the group_concat > function saying it's an unknown function, yet the same SELECT > statement works fine in the Firefox SQLite Manager extension. > > The version of sqlite3 on my Mac is 3.4.0

Re: [sqlite] Is the dbFileVers written to journal files?

2009-11-10 Thread Dan Kennedy
On Nov 11, 2009, at 1:24 AM, Scott Hess wrote: > Someone was asking me a question about what happens if the wrong > journal file gets applied to a database. My answer was that terrible > things happen. > > I found myself wondering if the "File change counter" value is stored > in the journal (*)

Re: [sqlite] How do I output multi-word strings without braces?

2009-11-10 Thread Dan Kennedy
On Nov 10, 2009, at 3:06 PM, Walter Dnes wrote: > Given the following code fragment... > > set xname [db eval { select name from elements where e_mtid = > $element }] > puts [format "Requested element ==> %s ==> %s" $element $xname] > > The "business rules" are such that I know I'll only get on

Re: [sqlite] Does has FTS3 external tokenizers ability now?

2009-10-30 Thread Dan Kennedy
On Oct 30, 2009, at 10:07 PM, Alexey Pechnikov wrote: > Hello! > > The feature was planning some times ago. Is this released now? Yes. See the README.tokenizers file in the full source (tar.gz) distribution for docs. Dan. ___ sqlite-users mailing lis

Re: [sqlite] Some clarification needed about Unicode

2009-10-29 Thread Dan Kennedy
On Oct 29, 2009, at 4:41 PM, Jean-Christophe Deschamps wrote: > >> [1] Supposing some textual data already inserted as UTF-8 (default >> mode) in >> a dBase, and a connection opened with sqlite3_open(): Does a >> sqlite3_column_text16 retrieves a correct UTF-16 content? Is to >> say, do >> SQLi

Re: [sqlite] Order of operations when using TRIGGERs

2009-10-22 Thread Dan Kennedy
On Oct 23, 2009, at 5:05 AM, Simon Slavin wrote: > I'm looking for assurance that things work the way I think they do, > and will continue to do so in future versions. > > I'm using a TRIGGER that is triggered AFTER INSERT. The INSERT > commands do not know or set the value for the ROWID column.

Re: [sqlite] commit time

2009-10-21 Thread Dan Kennedy
ad_uncommitted mode. Dan. > > John > > -----Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy > Sent: Thursday, October 22, 2009 12:06 AM > To: General Discussion of SQLite Database > Subject: Re: [

Re: [sqlite] commit time

2009-10-21 Thread Dan Kennedy
On Oct 22, 2009, at 5:21 AM, Tom Broadbent wrote: > if thread 1 opens a read cursor in read uncommitted mode it can > block a write lock? i thought the read happens w/o a lock? If using read-uncommitted mode, a reader thread will not block a writer thread that is using the same shared-cache.

Re: [sqlite] Does single thread SQLite have bugs?

2009-10-20 Thread Dan Kennedy
On Oct 20, 2009, at 12:49 PM, TEZ wrote: > Hi > > When I ran "make test", some errors were shown. > Is it meaning that SQLite has bugs? In this case it means the test script is buggy. Not SQLite itself. Dan. > $ uname -a > Linux localhost.localdomain 2.6.27-43vl5 #1 SMP Sat Aug 15 22:17:55

Re: [sqlite] searching sqlite tickets?

2009-10-19 Thread Dan Kennedy
On Oct 19, 2009, at 2:36 PM, Jens Miltner wrote: > Before the timeline was migrated to fossil, I was able to search for > tickets. > In the current sqlite.org website, I can no longer search for tickets > - I can only show all tickets, all closed tickets or all open tickets, > but I can't search

Re: [sqlite] "x NATURAL JOIN x" BUG

2009-10-19 Thread Dan Kennedy
On Oct 19, 2009, at 2:05 PM, Kristoffer Danielsson wrote: > > I did provide a sample with test data in my original post. However, > I posted it here too: > > http://www.sqlite.org/cvstrac/tktview?tn=4043 > > > > The tracker is obviously closed, but still, there it is :P. Don't > know where el

Re: [sqlite] sqlite-3.6.18: Segmentation fault on SQL INSERT.

2009-10-16 Thread Dan Kennedy
On Oct 16, 2009, at 2:53 PM, Vladimir Looze wrote: > Sqlite causes Segmentation fault on SQL insert. > > Steps to reproduce: > 1. create database with following schema (table/column names dosen't > matter) > > - BEGIN OF SQL LISTING > create table tname ( id integer not null primary key asc

Re: [sqlite] Foreign keys question

2009-10-15 Thread Dan Kennedy
On Oct 16, 2009, at 3:08 AM, Dennis Volodomanov wrote: > Dan Kennedy wrote: >> I don't think the triggers you are using can be implemented using >> foreign keys. Your triggers are basically reference counting (or >> garbage collecting, whatever you want to call it

Re: [sqlite] Foreign keys question

2009-10-15 Thread Dan Kennedy
On Oct 15, 2009, at 10:30 AM, Dennis Volodomanov wrote: > Hello all, > > I'm implementing the new FOREIGN KEY support in our database and I > have this small problem/question. > > Before I had triggers to take care of maintaining deletion of data > that's not referenced by any records, but I

Re: [sqlite] Corrupted database

2009-10-14 Thread Dan Kennedy
rruption. Once we sped everything up > and moved to synch=full, no transaction was even close to the grace > period, and such, terminatethread() is never called.. and we get no > corruption. > > Just a thought. > > -Original Message- > From: sqlite-users-boun...@sql

Re: [sqlite] Corrupted database

2009-10-13 Thread Dan Kennedy
? Dan. > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy > Sent: Tuesday, October 13, 2009 12:35 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Corrupted database > >

Re: [sqlite] Corrupted database

2009-10-12 Thread Dan Kennedy
On Oct 13, 2009, at 1:56 AM, McClellen, Chris wrote: > What is your synchronous set to? Full? FYI If you are using .NET > data > providers, it is set to "Normal" by default. > > If it is not set to full, I have seen corruption when an application > crashes, or exits when a thread is in the mi

Re: [sqlite] NOT LIKE

2009-10-12 Thread Dan Kennedy
On Oct 12, 2009, at 2:08 PM, Daniele Liscia wrote: > Does anybody know wether the "NOT LIKE" condition such as > > SELECT * FROM suppliers >WHERE supplier_name NOT LIKE '%blabla%'; > > works in sqlite? We have no reason to believe that it does not work. If you have evidence that suggests a p

Re: [sqlite] BUG: Async IO module works incorrectly with large database files

2009-10-08 Thread Dan Kennedy
k() ) and fails again because file doesn't exist > yet. And this error is already goes as a return code from > sqlite3_step(). > > > Pavel > > On Wed, Oct 7, 2009 at 9:57 AM, Dan Kennedy > wrote: >> >> On Oct 7, 2009, at 6:42 PM, Pavel Ivanov wrote: >&g

Re: [sqlite] BUG: wrong type casting for constants in tcl interface

2009-10-08 Thread Dan Kennedy
On Oct 7, 2009, at 10:41 PM, Alexey Pechnikov wrote: > Hello! > > I find some incorrect types casting for constants in all SQLite > versions. The behaviour is actually correct, assuming that SQLite is using sqlite3_bind_text() to bind the value of $i to the SQL statement executed by [db eval].

Re: [sqlite] BUG: Async IO module works incorrectly with large database files

2009-10-07 Thread Dan Kennedy
On Oct 7, 2009, at 6:42 PM, Pavel Ivanov wrote: > Hi! > > As anonymous users are not allowed to file bug reports on SQLite site > anymore so I'm sending it here. > > I've encountered segmentation fault at sqlite3async.c:715. The problem > is on sqlite3async.c:712: > > nCopy = (int)MIN(pWrit

Re: [sqlite] Tedious CSV import question

2009-10-06 Thread Dan Kennedy
On Oct 6, 2009, at 4:40 PM, Emyr Thomas wrote: > On Oct 5, 8:09 pm, Nuno Lucas wrote: >> Emyr Thomas wrote: >>> Could you please provide some info as to how you would build this as >>> an extension module on Linux? >> >> "make" ? >> >> It would be easier if you stated why that doesn't work for y

Re: [sqlite] How do I get context in collation function?

2009-10-03 Thread Dan Kennedy
> BTW while wandering in the 3.6.18 amalgamation source looking at how > allocation failures are handled, I found a number of sqlite3_malloc > whose return values are used (written to) head first without prior > checking against 0. We know there are still some of these cases in the fts3 code. If y

Re: [sqlite] Need help To Get Started with SQLITE

2009-10-03 Thread Dan Kennedy
On Oct 4, 2009, at 12:01 AM, jack wrote: > I just setting out to learn how to use sqlite3 (3.6.18). Obviouly > I'm missing some very important points. > > The very simple test app below is to open (and create) an sql > datbase then close it > > Using windows XP. Using a precompiled .LIB. I

Re: [sqlite] Error in type-def syntax diagram notation??

2009-10-02 Thread Dan Kennedy
On Oct 2, 2009, at 12:33 PM, Keith Roberts wrote: > I'm trying to learn the syntax for SQLite, and I'm getting > stuck with the type-def production in: > > http://www.sqlite.org/lang_createtable.html > > I read it as a type-def production is a sequence of one or > more instances of a terminal sym

Re: [sqlite] SQLite crashes when trying to INSERT into table with wrong default value

2009-10-01 Thread Dan Kennedy
On Sep 30, 2009, at 1:33 PM, ste...@schallerl.com wrote: > Hi all, > > i've got a table: > CREATE TABLE [usr_user] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, > [name] TEXT, [email] TEXT, [password] TEXT, [createDate] DATETIME > DEFAULT (NOW())) Looks like the same problem as this one: http://w

Re: [sqlite] Inconsistency in mutex.h and mutex.c

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 5:29 AM, Schrum, Allan wrote: > At the bottom of mutex.h there is an: > > #ifdef SQLITE_MUTEX_OMIT > ... > #endif /* defined(SQLITE_OMIT_MUTEX) > > Either the comments or the define should be changed. This occurs in > mutex.c as well. > > The pattern for all other "OMIT" def

Re: [sqlite] Use of .TIMER within sqlite3 commandline utility: was RE: sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 1:41 AM, Griggs, Donald wrote: > > > I believe one must enable the .TIMER option when compiling > sqlite3. I > think the pre-compiled versions have this disabled by default (at > least > for the Windows binaries). The .timer command is only available on unix and unix-li

<    7   8   9   10   11   12   13   14   15   16   >