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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Re: [sqlite] commit time

2009-10-21 Thread Dan Kennedy
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: [sqlite] commit time

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

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

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
ped 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...@sqlite.org > [mailto:sqli

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

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

2009-10-08 Thread Dan Kennedy
n 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 <danielk1...@gmail.com> > wrote: >> >> On Oct 7, 2009, at 6:42 PM, Pavel Ivanov wrote: >> >

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

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 =

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

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

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

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:

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"

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

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 1:09 AM, Ralf Junker wrote: > At 14:04 29.09.2009, Dan Kennedy wrote: > >> On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: >> >>> My memory manager reports that the SQL below results in memory being >>> reused after it has already be

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Dan Kennedy
On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: > My memory manager reports that the SQL below results in memory being > reused after it has already been freed when it is RUN FOR A SECOND > TIME on the same database connection. Hi Ralf, Thanks for this report. I'm unable to reproduce the

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-24 Thread Dan Kennedy
On Sep 24, 2009, at 7:04 PM, CityDev wrote: > > Thanks for that Sebastian. > > It does however surprise me. I believe Access Jet handles simultaneous > activities. Indeed I've got a feeling it does row-locking rather than > page-locking. It's odd that SQLite has such a limitation. Anyway, >

Re: [sqlite] List of active savepoints names

2009-09-22 Thread Dan Kennedy
On Sep 22, 2009, at 2:38 PM, Lukas Gebauer wrote: >> A simple rule of thumb is to look at how useful features would be to >> other SQLite users. Note that you are the only one to have asked for >> this feature and not one other person has agreed with you on its >> need! >> The responses have

Re: [sqlite] Force the use of a specified index?

2009-09-17 Thread Dan Kennedy
On Sep 17, 2009, at 5:02 AM, Bart Smissaert wrote: > Is it possible to tell SQLite to use a specified index? > I know you can use the + to excludes fields being used in an index, > but this doesn't help me in this particular case. I remember a > discussion about this and that this option might

Re: [sqlite] First "SELECT" query fails

2009-09-14 Thread Dan Kennedy
On Sep 14, 2009, at 1:35 PM, wrote: > Hi, > Any help to the below problem is of great help. Please check if this happens with 3.6.18. I think these issues may be fixed now. Dan. > Regards, > Reddy > > -Original Message- > From:

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
=0xa01a893c "select > * from > user", nBytes=-1, ppStmt=0xa0252d78, pzTail=0xa0252d7c) > (SQLite\prepare.c:765) > > #24 A003BF98 sqlite3_exec(db=0xa025b858, zSql=0xa01a893c "select * > from > user", xCallback=0xa003fcd0 , pArg=0x0, pzErrMsg=0xa0252dbc) &

Re: [sqlite] SQLite version 3.6.18

2009-09-11 Thread Dan Kennedy
On Sep 12, 2009, at 12:01 AM, Simon Slavin wrote: > > On 11 Sep 2009, at 5:45pm, D. Richard Hipp wrote: > >> The second major enhancement is that SQLite now support recursive >> triggers. The older non-recursive behavior of triggers is still the >> default behavior. Recursive triggers are

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread Dan Kennedy
On Sep 11, 2009, at 4:32 PM, rishabh wrote: > > i have a stream of data coming in with constant table names and data. > one of the table names contains a '-' (minus sign). it gives error > while > creating the table. > > SQL error: near "-": syntax error > something like Create table "t-t" ( a

Re: [sqlite] sqlite3_exec fails on arm

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

Re: [sqlite] Importing data into SQLite

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

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

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

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

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

Re: [sqlite] Undefined Symbol: Tcl_CreateObjCommand

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

<    7   8   9   10   11   12   13   14   15   >