Re: [sqlite] Trigger Steps

2008-03-25 Thread drh
"Noah Hart" <[EMAIL PROTECTED]> wrote: > The documentation for Triggers defines a trigger step as follows: > > trigger-step ::= update-statement | insert-statement | > delete-statement | select-statement > > What would be an example of the select-statement? > SELECT statements are useful

Re: [sqlite] Problems Compiling Sqlite

2008-03-25 Thread drh
Jus GoodFun <[EMAIL PROTECTED]> wrote: > > I tried the DSQLITE_MUTEX_NOOP and then a rebuild but still > got the following compile errors, I'm sure I'm missing something > simple... Try compiling with -DSQLITE_THREADSAFE=0 -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Lit

2008-03-24 Thread drh
"Rob Richardson" <[EMAIL PROTECTED]> wrote: > I'm thinking whether this is a memory leak or not sort of depends on > your definition. If a process is designed to remain open for long > periods of time with little activity, and it ends up taking up 1 > gigabyte of memory, that looks an awful lot

Re: [sqlite] performance under load

2008-03-24 Thread drh
"Sam Carleton" <[EMAIL PROTECTED]> wrote: > My application is an apache based kiosk system that displays images. > The SQLite database is used by PHP to track user info, who is logged > in and what they have selected. SQLite is NOT managing anything about > the files. I have a few customers that

Re: [sqlite] Help with sqlite3_blob_open()

2008-03-24 Thread drh
"A.J.Millan" <[EMAIL PROTECTED]> wrote: > Hello all: > > Using Windows XP: > > D:\Z\Zator5>sqlite3 zdb1 > SQLite version 3.5.4 > Enter ".help" for instructions > sqlite> .tables > AgEfHolder AgEfemerAgVtHolder AgVtos Usr lnk > AgEfIDt AgPdHolder AgVtIDt Block

Re: [sqlite] Is it safe to ...

2008-03-24 Thread drh
"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > Hello, > Is it safe to use this algorithm: > > open_db > fork() > sql_do() // both parent and child executes sql statements > close_db > > I am not familiar with locking mechanism and I am afraid that if > parent and child will use the same DB

Re: [sqlite] Moving port from 3.5.1 to 3.5.7...

2008-03-21 Thread drh
Mark Spiegel <[EMAIL PROTECTED]> wrote: > I'm looking to jump my code port forward from 3.5.1 to 3.5.7. > > Clearly I have some memory management work to do since > SQLITE_OMIT_MEMORY_ALLOCATION support has been dropped. None of the > existing allocation implementations look acceptable so

Re: [sqlite] New crashes with SQLite 3.5.7

2008-03-21 Thread drh
"Peter Weilbacher" <[EMAIL PROTECTED]> wrote: > On Thu, 20 Mar 2008 17:52:21 UTC, drh wrote: > > > Any additional information you can send, such as the size of > > the database file at the point of failure, or the exact line > > on which the probl

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-20 Thread drh
Kees Nuyt <[EMAIL PROTECTED]> wrote: > > >I know I can't create an invalid view, > >because SQLite refuses to create it, > >but this seems a problem to me... could SQLite just open the database, and > >complain only on the invalid views (i.e. for instance when I open the view > >to query the data

Re: [sqlite] New crashes with SQLite 3.5.7

2008-03-20 Thread drh
"Shawn Wilsher" <[EMAIL PROTECTED]> wrote: > Hey all, > > Mozilla has recently upgraded to sqlite 3.5.7, and we've suddenly > gotten a lot of crashes. The mozilla bug report is here: > https://bugzilla.mozilla.org/show_bug.cgi?id=424163 > > We haven't looked into it to much, but I figured I'd

Re: [sqlite] Sorting and Descending Index

2008-03-19 Thread drh
Martin Engelschalk <[EMAIL PROTECTED]> wrote: > Hello All, > > I have to select data from a large table (several million records) in > descending order and created an index for that purpose. However, sqlite > seems not to use this index for selecting the data. > > In the documentation of the

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-19 Thread drh
MarcoN <[EMAIL PROTECTED]> wrote: > Hello, everybody. > > I have the following problem: I have an old project that uses a database > created with an older SQLite library version. > Now, since I updated SQLite to 3.5.5, I can't use the database anymore, > because any query on the database tables

Re: [sqlite] How to get the minutes number only

2008-03-18 Thread drh
Joanne Pham <[EMAIL PROTECTED]> wrote: > Hi All > I ran the following statement: > select datetime(startTime *60, 'unixepoch','-8 hours') , bytesIn from > wanPerfTable where appId = 30 and remoteWXId = 200; > and below is my output. > > 2007-12-03 11:00:00 20 > 2007-12-03 11:01:00 5

Re: [sqlite] SQL logic error or missing database in version 3.5.6 (Bug???)

2008-03-18 Thread drh
"Steve Topov" <[EMAIL PROTECTED]> wrote: > Hello, > > Recently I upgraded SQLite to version 3.5.6 and discovered that my > program can’t work anymore with some database files. Sqlite3_open > returns OK, but when I am trying to execute any SQL statement it returns > “SQL logic error or missing

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-18 Thread drh
MarcoN <[EMAIL PROTECTED]> wrote: > Yes, of course I can send you the DB: the file is under 1MB, about 100K if > compressed via .zip > Can I send it to you via e-mail? > Thanks very much for the support > Please send the database directly to my email address shown below. -- D. Richard Hipp

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-18 Thread drh
MarcoN <[EMAIL PROTECTED]> wrote: > I actually don't know how to export it, because "SQLite Database browser" > (that is able to open the database and execute the query) has no way to > export it; SQLiteSpy will not open the database because it is compiled with > a new SQLIte library version >

Re: [sqlite] Meaning of the following code

2008-03-17 Thread drh
"Rich Rattanni" <[EMAIL PROTECTED]> wrote: > All: > I am able to consistently cause the following message during a integrity check > > Page xxx is never used > > This seems non-critical, since a vacuum clears this up. If someone > has the time could you explain the meaning (besides the

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-17 Thread drh
MarcoN <[EMAIL PROTECTED]> wrote: > Hello, everybody. > > I have the following problem: I have an old project that uses a database > created with an older SQLite library version. > Now, since I updated SQLite to 3.5.5, I can't use the database anymore, > because any query on the database tables

Re: [sqlite] Efficiency Question - Value Or Liability for Indexing of This Table?

2008-03-14 Thread drh
"Lee Crain" <[EMAIL PROTECTED]> wrote: > I am debating the performance gains to be realized, if any, by indexing a > particular table in a system implementation for which I am responsible. > You are getting way ahead of yourself. Stop trying to speculate about whether or not an index or

Re: [sqlite] Testing the rowid algorithm. Was: Generating new rowid alg o

2008-03-11 Thread drh
Nicolas Williams <[EMAIL PROTECTED]> wrote: > > Slightly OT: The current SQLite3 test code base makes use of internal > interfaces, which means you can't necessarily test the bits that you > want to install. It'd be nice to be able to test the bits actually > installed. See

[sqlite] Testing the rowid algorithm. Was: Generating new rowid algo

2008-03-11 Thread drh
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote: > "B V, Phanisekhar" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] > > So is it possible > > that SQLITE will give an error when attempting to insert a record even > > if there are free ROWID's? > > Yes, in theory. If you have close to

Re: [sqlite] Basic system setup for tracing?

2008-03-10 Thread drh
"software.simian" <[EMAIL PROTECTED]> wrote: > > Just step-in; I'm studying the sqlite code and it would be easier if I could > see the internal in action. > * Compile with -DSQLITE_DEBUG=1 * PRAGMA vdbe_trace=ON; * PRAGMA vdbe_listing=ON; -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Impossible to "catch locked state" (SQLite 3.5.6 & TCL)

2008-03-08 Thread drh
Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > I'm afraid, I've discovered a bug: there's no possibility to "catch" the > error "database is locked". Even, when one's trying something like: > > #v+ > if { [catch {sqlite3 dbcomm $fullPathToDatabaseFile} err] } { > puts $err > } > #v- > >

Re: [sqlite] [C] Linker Error

2008-03-08 Thread drh
Clay Dowling <[EMAIL PROTECTED]> wrote: > Severin Müller wrote: > > I tried to include sqlite3 in my current C Project. = > > > = > > > I downloaded the precompiled library sqlite-3.5.6.so and put it in my pro= > ject. > > Then, i downloaded the sqlite source and added sqlite3.h to my project. =

Re: [sqlite] Can I automatically create a 'disambiguation' number in a second field of a primary key?

2008-03-03 Thread drh
"Paul Hilton" <[EMAIL PROTECTED]> wrote: > > Here is the problem: I want Slot created to disambiguate the Primary Key, So > that for every value of Group the value of Slot starts at 1 and counts up. These are two different things: (1) Slot needs to disambiguate the PRIMARY KEY (2) Slot

Re: [sqlite] Does sqlite3_prepare() clean up after itself if itfails?

2008-03-03 Thread drh
"Scott Hess" <[EMAIL PROTECTED]> wrote: > > True, but my code snippet didn't check for NULL. If, for some reason, > SQLite returned a partial statement handle with an error code, then > I'd expect you would want to pass it back to sqlite3_finalize(). > Since sqlite3_finalize() explicitly handles

Re: [sqlite] Transaction log writing performance

2008-02-22 Thread drh
Marco Bambini <[EMAIL PROTECTED]> wrote: > > So, is safe so to set PRAGMA synchronous=NORMAL; under MacOS X? > I am told probably not, though Apple has never issued a definitive statement on the question. -- D. Richard Hipp <[EMAIL PROTECTED]> ___

Re: [sqlite] Transaction log writing performance

2008-02-22 Thread drh
"Brian Smith" <[EMAIL PROTECTED]> wrote: > When SQLite writes to the log file, it > > (1) writes all the data, > (2) fsyncs, then > (3) updates the page count in the header, and finally > (4) fsyncs again. > > Isn't it possible to change SQLite so that the steps 3 > and 4 are unnecessary? >

Re: [sqlite] Most widely deployed?

2008-02-21 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > > Nokia sold 350 million cell phones last year alone. Each of those phones > probably had some embedded database on them. It may even be SQLite for > all I know, but if it is not, then it substantially increases the number > of non-SQLite database

Re: [sqlite] Data Recovery - Unvacumed DB - OS X Address Book

2008-02-21 Thread drh
Joshua Galvez <[EMAIL PROTECTED]> wrote: > Any help would be appreciated. Even as much as, "No, there really is > no way to do this." > No, there really is no way to do this, at least not without some internal knowledge of what kinds of information Apple is storing in the data.syncdb file.

Re: [sqlite] Execute PRAGMA max_page_count command

2008-02-21 Thread drh
"Raviv Shasha" <[EMAIL PROTECTED]> wrote: > Although I limit the sqlite database to 32768 (32K), the db file which > retrieved is equal to 470K. > > What regrading the operations sequence ? Is it correct to first > initialize the sqlite database and then to execute the PRAGMA > max_page_count

Re: [sqlite] Unrecognized "Z" UTC time zone signifier

2008-02-21 Thread drh
Ralf Junker <[EMAIL PROTECTED]> wrote: > SQLite does not recognize "Z" as the zero offset time zone specifier. SQLite does not currently accept any timezone specifiers, other than a hard-coded timezone offset: 1981-04-06T14:45:15+01:00 If we start accepting any symbolic timezone names,

Re: [sqlite] Access to SQLite via two languages in one process

2008-02-20 Thread drh
Nicolas Williams <[EMAIL PROTECTED]> wrote: > On Wed, Feb 20, 2008 at 04:23:29PM +, [EMAIL PROTECTED] wrote: > > Nicolas Williams <[EMAIL PROTECTED]> wrote: > > > does SQLite know about POSIX file locks on the same files from > > > other instances of itself? > > > > Yes. That's the whole

Re: [sqlite] Access to SQLite via two languages in one process

2008-02-20 Thread drh
Nicolas Williams <[EMAIL PROTECTED]> wrote: > does SQLite know about POSIX file locks on the same files from > other instances of itself? Yes. That's the whole point of POSIX advisory locking. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users

Re: [sqlite] Composite primary key?

2008-02-19 Thread drh
Rael Bauer <[EMAIL PROTECTED]> wrote: > Hi, > > > 1. with sqlite Is it possible to have a primary key made up of 2 fields? > (If so how...) > (from firebird: > ALTER TABLE "table1" ADD CONSTRAINT PK_TABLE1 PRIMARY KEY > ("field1","field2");) > > > 2. Is it possible to add a

[sqlite] Please test lastest CVS using WinCE

2008-02-19 Thread drh
Can somebody with the ability to compile and test for wince please test check-in [4802] for me. http://www.sqlite.org/cvstrac/chngview?cn=4802 For that matter, is there anybody out there who would like to become the official wince maintainer for SQLite? If you are able to compile, test, and

Re: [sqlite] Using a UUID as a key

2008-02-19 Thread drh
"David A. Cobb" <[EMAIL PROTECTED]> wrote: > It appears that, given SQLite's Manifest Typing, the appropriate type of > a UUID -- 16bytes, binary -- would be BLOB. One would not want to try > converting the ID to anything, if only for the cost in time. > > Can a BLOB be the Primary Key for a

Re: [sqlite] SQLite Like Query Optimization

2008-02-18 Thread drh
"Kalyani Phadke" <[EMAIL PROTECTED]> wrote: > I have not recompiled sqlite 3 before. I am having trouble to find > documentation. > > Could anyone pls tell me how can I compile SQLite3 source code on > windows xp machine. Do I need to download FTS3 files ? Where can I find > those files? How can

Re: [sqlite] Sqlite Version 3.2.2

2008-02-18 Thread drh
"Walt" <[EMAIL PROTECTED]> wrote: > Is it feasible to a DataBase on one computer and have multiple > users on a LAN accessing the DataBase at the same time? > This can be made to work. But you will probably be much happier with a client/server database such as MySQL or PostgreSQL. They are

Re: [sqlite] PRIMARY KEY? Date and time datatypes?

2008-02-18 Thread drh
Gilles Ganault <[EMAIL PROTECTED]> wrote: > On Sat, 16 Feb 2008 11:29:29 +1100, BareFeet > <[EMAIL PROTECTED]> wrote: > > If you designate an integer column as also being the primary key, > > then SQLite will auto assign its value incrementally each time > > you insert a new row, unless you

Re: [sqlite] SQLite Like Query Optimization

2008-02-16 Thread drh
"Evans, Mark (Tandem)" <[EMAIL PROTECTED]> wrote: > snip... > > > > > LIKE operators cannot use indices unless the index is case > > insensitive. Use GLOB for case sensitive fields. > > > > Richard - i'm not sure i understand "unless the index is case insensitive." > How does that relate

Re: [sqlite] expose sqlite3_put_Varint & sqlite3_get_varint

2008-02-15 Thread drh
Ken <[EMAIL PROTECTED]> wrote: > Any reason why the functions above could not be exposed as part of the > sqlite3 api suite? > The usually reasons apply: To expose them as part of the sqlite3 api suite means that they would have to be supported, documented, and tested forever and it also

Re: [sqlite] SQLite Like Query Optimization

2008-02-15 Thread drh
"Kalyani Phadke" <[EMAIL PROTECTED]> wrote: > I am using Sqlite 3 as my database. One of my table contains 1280010 > rows. Db file size is 562,478KB. I am running DB on Windows XP pro-P4 > CPU 3.20GHz 3.19Hz ,2.00GB of RAM ) > > CREATE TABLE TableA > ( > ID INTEGER NOT NULL PRIMARY KEY

Re: [sqlite] Blob incremental i/o via Python

2008-02-14 Thread drh
"Samuel Neff" <[EMAIL PROTECTED]> wrote: > If the images you're storing are larger than the defined page size for the > database (which is most likely the case) then you can get better performance > and reduced memory consumption by storing the images in the file system and > store only paths to

Re: [sqlite] Function hex

2008-02-14 Thread drh
Mau Liste <[EMAIL PROTECTED]> wrote: > > results in: SQL error: no such function: hex > Added by version 3.3.13, one year ago yesterday. http://www.sqlite.org/releaselog/3_3_13.html What version are you running? -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] indexing

2008-02-13 Thread drh
Kasper Daniel Hansen <[EMAIL PROTECTED]> wrote: > I have a table with two variables, say A and B (both integers). The > table is rather large - around 2.9 GB on disk. Every combination of > (A,B) occurs only once. I am creating a unique index as >CREATE UNIQUE INDEX ABidx ON abtable (A,B)

Re: [sqlite] blob incremental i/o constraints

2008-02-13 Thread drh
"Igor Sereda" <[EMAIL PROTECTED]> wrote: > The questions around sqlite3_blob_xxx methods that Roger brought up a couple > of months ago are very interesting for me too, and I haven't seen any reply > to Roger's message. (Roger - do you have any update?) > > As far as I can gather from the cited

Re: [sqlite] Updatable views

2008-02-11 Thread drh
John Stanton <[EMAIL PROTECTED]> wrote: > That ia a nice idea. To have a pragma which specied the dialect. There > could be "strict" or "ansi" and "mysql", "oracle", "sqlserver" etc etc. > It would give tighter control over hard to track annoying minor syntax > errors. > And, it would

Re: [sqlite] Innovative examples / user stories

2008-02-11 Thread drh
Lars Aronsson <[EMAIL PROTECTED]> wrote: > Is there any documentation of how people use SQLite in odd ways in > their everyday activities? Did you see http://www.sqlite.org/whentouse.html The document above is not exactly what you are asking for since it does not list real-world examples,

Re: [sqlite] VFS memory leak : During lock / unlock operations

2008-02-08 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > There are no lock leaks. But on the other hand, there is not > > a one-to-one mapping of lock to unlock calls. unlock is called > > more often than lock and there are often attempts to unlock files > > that have never

Re: [sqlite] VFS memory leak : During lock / unlock operations

2008-02-08 Thread drh
<[EMAIL PROTECTED]> wrote: > Hi.. > >we are using sqlite3.3.4 with Integrity OS. we are facing a problem > where in the VFS memory is getting exhausted due >to large lock/unlock calls made by sqlite. Integrity support team > said that, for each file lock call made by sqlite, a definite

Re: [sqlite] VFS memory leak : During lock / unlock operations

2008-02-08 Thread drh
Brad House <[EMAIL PROTECTED]> wrote: > >> they have put traces and identified that for 1000 lock calls > >> there are only 950 unlock calls, which is a shortage of 50 unlock > >> calls. > > The os_unix.c backend to SQLite makes no attempt to match lock/unlock > > calls, because posix does not

[sqlite] Bug found in the new register-based VM

2008-02-06 Thread drh
I had been saying in release announcements that no bugs have been found in the new register-based virtual machine introduced in SQLite version 3.5.5. That changed with ticket #2927. We have now observed our first register-VM bug. http://www.sqlite.org/cvstrac/tktview?tn=2927 There will

Re: [sqlite] SQLite Web Site

2008-02-06 Thread drh
"L. S." <[EMAIL PROTECTED]> wrote: > The page never loads. I get the message, "The page download could not > be completed. Please try again later." > > Here is the User-Agent header string: > Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D052; > Blazer/4.5) 16;320x320 > The

Re: [sqlite] SQLite Web Site

2008-02-06 Thread drh
"L. S." <[EMAIL PROTECTED]> wrote: > I've been ignoring this issue for a while; the world won't end over this > but... > There is some issue with the newly-designed SQLite web site that > prevents access from my Palm Treo. It used to be accessible, with the > old design. > -- > Often I surf,

Re: [sqlite] when to analyze?

2008-02-06 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Suppose we have a table with some 10 million rows and this table was > analysed, so sqlite_stat1 has the stats of this table then is it worth it to > analyze again after adding say 1000 more rows? The indexing is still the > same, so no indexes are

Re: [sqlite] SQLite and signal handlers

2008-02-06 Thread drh
Felix Radensky <[EMAIL PROTECTED]> wrote: > Hi, > > What is a recommended way of handling signals in daemon > processes using sqlite database ? Is calling sqlite3_interrupt() > in SIGTERM handler considered good enough ? > sqlite3_interrupt() was originally create for the specific purpose of

[sqlite] New SQLite mailing lists.

2008-02-06 Thread drh
Two new SQLite mailing lists have been established: sqlite-announce sqlite-dev Additional information and links to pages where you can sign up can be found at http://www.sqlite.org/support.html -- D. Richard Hipp <[EMAIL PROTECTED]> ___

[sqlite] SQLite version 3.5.6

2008-02-06 Thread drh
SQLite version 3.5.6 is now available on the website. http://www.sqlite.org/download.html There is very little change from version 3.5.5. The reason for this release is that there was a regression in the virtual table mechanism that prevented virtual tables from being used in LEFT OUTER

Re: [sqlite] Mailing List Changes

2008-02-04 Thread drh
Nicolas Williams <[EMAIL PROTECTED]> wrote: > On Tue, Feb 05, 2008 at 01:30:01AM +, [EMAIL PROTECTED] wrote: > > And yet nearly everyone I know loaths that behavior. The > > overwhelming majority of users prefer mailing list replies > > to go back to the mailing list *only*. > > Users need

Re: [sqlite] Mailing List Changes

2008-02-04 Thread drh
Doug Currie <[EMAIL PROTECTED]> wrote: > > > Please set the list so default reply is to the list. > > http://www.unicom.com/pw/reply-to-harmful.html > One finds various screeds such as the one Doug references above. And on the configuration screen for GNU mailman, it "strongly recommends"

Re: [sqlite] open statements upon close

2008-02-04 Thread drh
Ken <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm getting a sqlite error when running sqlite3_close. The error indicates > that there are open statements. > > To the best of my knowledge all statements are closed. I loooked at the > sqlite3_close function and call to close the virtual tables

Re: [sqlite] 3.5.5 Compilation failure / Bug

2008-02-04 Thread drh
Ken <[EMAIL PROTECTED]> wrote: > Amalgamation fails to compile when -DSQLITE_OMIT_VIEW is defined. > Neither the nor the preprocessed sources work with -DSQLITE_OMIT macros. If you need to use -DSQLITE_OMIT, then you will need to compile on Unix using the original source code. Both the

Re: [sqlite] Version 3.5.5 Released

2008-02-02 Thread drh
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Got the > sqlite3.exe version 3.5.5 but .explain still doesn't seem to work. > Maybe it's me, could someone post a simple example of .explain working? > C:\ sqlite3 SQLite version 3.5.5 Enter ".help" for instructions sqlite> create table t1(x);

Re: [sqlite] Precompiled binaries for Windows Not Version 3.5.5

2008-02-01 Thread drh
"Zarko Popovski" <[EMAIL PROTECTED]> wrote: > I see also SQLite 5.5.4 version compiled, is there SQLite 3.5.5 precompiled > version for M$ Windows or if there is not drh. please compile it :) > I fixed that problem this morning. When did you last look? -- D. Richa

Re: [sqlite] SQLite 3.5.5 on OpenBSD running on HPPA (HP9000) make test

2008-02-01 Thread drh
Rob Sciuk <[EMAIL PROTECTED]> wrote: > Dear DRH, > > I post the previous (FreeBSD/Ubuntu) and this *ONLY* to exercise the new > 3.5.5 bits given the wholsale changes. I hope you find them useful, but > AFAICT, 3.5.5 looks pretty good from a perf/stability standpoint. >

Re: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread drh
Gilles <[EMAIL PROTECTED]> wrote: > At 15:40 31/01/2008 -0800, James Dennett wrote: > > > WHERE col LIKE '123%' or WHERE substr(col,1, 3) = '123' > > > >The optimizer has a decent chance of using an index for LIKE '123%' but > >I'd be surprised (and impressed) if it looks inside function calls

Re: [sqlite] Solaris make test compilation error

2008-01-31 Thread drh
Ken <[EMAIL PROTECTED]> wrote: > Solaris 5.8 (solars 8) > make test > > Undefined first referenced > symbol in file > sched_yield /var/tmp//cckDMcyL.o > ld: fatal: Symbol referencing errors. No output written to

Re: [sqlite] Broken links to "sqlite3" on website

2008-01-31 Thread drh
"David Baird" <[EMAIL PROTECTED]> wrote: > The "sqlite3" link is broken from multiple web pages: > > http://www.sqlite.org/c3ref/objlist.html > http://www.sqlite.org/c3ref/intro.html > > Also, links to "sqlite3_stmt" are broken. It seems that any link > containing a %20 is broken, e.g.

Re: [sqlite] make test on FreeBSD 6.2-R, SQLite 3.5.5

2008-01-31 Thread drh
"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > Here is my "make test" on Mac OS 10.5.1: > > 8 errors out of 38117 tests > Failures on these tests: lock4-1.3 vtab6-2.2 vtab6-2.4 vtab6-2.5 > vtab6-2.6 vtab6-7.1 vtab6-9.1.1 vtab6-9.2 > All memory allocations freed - no leaks > Maximum memory

Re: [sqlite] Version 3.5.5 Released

2008-01-31 Thread drh
"Noah Hart" <[EMAIL PROTECTED]> wrote: > With SQLITE_OMIT_VIRTUALTABLE defined, I get a linker fault under VC++ > > It claims that: > error LNK2001: unresolved external symbol sqlite3VtabBeginParse That call *is* surrounded by #ifndef SQLITE_OMIT_VIRTUALTABLE. But the #ifndef is located in

Re: [sqlite] make test on FreeBSD 6.2-R, SQLite 3.5.5

2008-01-31 Thread drh
"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > How to get error messages from test? Scroll up and copy-paste? Or > there is some other more handy method? make test | tee testout.txt -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] make test on FreeBSD 6.2-R, SQLite 3.5.5

2008-01-31 Thread drh
Rob Sciuk <[EMAIL PROTECTED]> wrote: > Ran the tests on Freebsd, the make test summary follows: > [delenda => ... Ok] > > 16 errors out of 38961 tests > Failures on these tests: bind-4.4 bind-4.5 cast-3.14 cast-3.18 cast-3.24 > printf-1.7.6 printf-1.8.6 printf-1.9.7 tcl-1.6 vtab6-2.2 vtab6-2.4

[sqlite] Version 3.5.5 Released

2008-01-31 Thread drh
SQLite version 3.5.5 is now available for download from the SQLite website: http://www.sqlite.org/ The big change from version 3.5.4 is that the internal virtual machine was reworked to use operands in registers rather than pulling operands from a stack. The virtual machine stack has now

Re: [sqlite] sqlite3_free_table and sqlite3_close

2008-01-31 Thread drh
Torsten Blix <[EMAIL PROTECTED]> wrote: > Hi, > > is it safe to do the following in a C program while working with SQLite? I > tried searching the docs but couldn't find any answer. > > sqlite3_open(); > sqlite3_get_table(...result); > sqlite3_close(); > sqlite3_free_table(result); > > i.e.

[sqlite] SQLite website outage & mailing list upgrade, 2008-02-02

2008-01-30 Thread drh
We are going to be upgrading the server that runs the SQLite website this comming Saturday, if all goes according to plan. We are planning to changes the operating system from Debian to Ubuntu and the mailing list manager from ezmlm to GNU mailman. If everything goes as planned, the outage will

Re: [sqlite] How Does NOT NULL produce NULLs?

2008-01-29 Thread drh
"Lee Crain" <[EMAIL PROTECTED]> wrote: > I did expect SQLite to enforce the NOT NULL portion of the SQL > creation statements, no matter what. SQLite *does* enforce NOT NULL no matter what. I think your pointers are getting turned into NULLs someplace else, perhaps somewhere in the QT layer. A

Re: [sqlite] How Does NOT NULL produce NULLs?

2008-01-29 Thread drh
"Lee Crain" <[EMAIL PROTECTED]> wrote: > I've created a table with several fields, 3 of which are created using > these SQL statements: > > [description] [varchar](255) NOT NULL DEFAULT ('') COLLATE NOCASE, > > [keywords][varchar](255) NOT NULL DEFAULT ('') COLLATE NOCASE, > >

Re: [sqlite] Why does the FAQ example use 2 copies for adding/deleting a column

2008-01-28 Thread drh
Lothar Scholz <[EMAIL PROTECTED]> wrote: > Hello, > > The example for question 11 in the FAQ has this code for dropping an > existing table column 'c' > > BEGIN TRANSACTION; > CREATE TEMPORARY TABLE t1_backup(a,b); > INSERT INTO t1_backup SELECT a,b FROM t1; > DROP TABLE t1; > CREATE TABLE

Re: [sqlite] SQLite and OS X - Can I have multiple versions?

2008-01-28 Thread drh
"P Kishor" <[EMAIL PROTECTED]> wrote: > > Most folks though install their own version of SQLite under the > /usr/local tree ... Why do people feel like they need SQLite to be a seperately library? It is *designed* to be statically linked. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] SQLite 3.4.x to 3.5.x drop-in compatibility?

2008-01-28 Thread drh
Carl Gundel <[EMAIL PROTECTED]> wrote: > Hey all, > > I'm thinking about upgrading to v3.5.4 the latest SQLite from v3.4.0 for the > next release of Run BASIC, and I'm wondering about a couple of things: > > 1) Do I need to change the way I make calls to the database engine? Is the > API the

Re: [sqlite] How to specify regular expression in a query?

2008-01-28 Thread drh
Nicolas Williams <[EMAIL PROTECTED]> wrote: > On Mon, Jan 28, 2008 at 10:07:01AM +0100, Ralf Junker wrote: > > Hello Bharath Booshan L, > > > > >>select * from t where filepath regexp '/MyMovie(\.[^\.]+)*$'; > > > > > >Will this query use index, if we had one, on filepath? > > > > No. It will do

Re: [sqlite] Number of elements in IN clause

2008-01-28 Thread drh
"Samuel R. Neff" <[EMAIL PROTECTED]> wrote: > I don't think it is standard SQL. At the very least, it doesn't work in > MSSQL. Standard is > > SELECT * FROM maintable WHERE key IN (select x from stuff); > > SQLite shortened version is much nicer.. wish it was standard. > SQLite also

Re: [sqlite] Number of elements in IN clause

2008-01-28 Thread drh
Felix Radensky <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any limitation on the number of elements in IN clause ? > Can one have, e.g. thousands of elements ? Also, can having > to many elements become inefficient at some point and one > has to use some other technique, i.e. comparing

Re: [sqlite] SQLite omit using index

2008-01-23 Thread drh
"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > Hello All, > I've found that SQLite-3.5.4 doesnt use index in this situation: > > sqlite> create table t1 (id int primary key, val int); > sqlite> create table t2 (id unique, val int primary key); > sqlite> explain query plan update t1 set val =

Re: [sqlite] Performance degradation after 3.3.17 -> 3.5.4 upgrade

2008-01-23 Thread drh
"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > On Jan 21, 2008 12:58 AM, Alexander Batyrshin <[EMAIL PROTECTED]> wrote: > > On Jan 20, 2008 11:32 PM, <[EMAIL PROTECTED]> wrote: > > > "Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > > > > Hello everyone. > > > > I've discover performance

Re: [sqlite] Query problem

2008-01-23 Thread drh
[EMAIL PROTECTED] wrote: > > > This appears to be slightly different than normal *nix globbing since > > SQLite uses '^' rather than '!' for the set inversion (if my reading of > > the source is correct). > > GLOB is suppose to exactly mimic Unix, except that SQLite does not > break pattern

Re: [sqlite] Journal Files

2008-01-23 Thread drh
"Mark Riehl" <[EMAIL PROTECTED]> wrote: > I'm working with version 3.5.2 under Linux. I've got a database that > is being shared between two processes and I'm running into issues with > the journal file that doesn't go away. When that happens, one process > appears to have the lock on the

Re: [sqlite] Query problem

2008-01-23 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: >> > SQLite seems to do the following: > > The glob syntax supports the following patterns: > ? - matches any single character > * - matches zero or more characters > [seq] - matches any single character in seq > [!seq] - matches any

Re: [sqlite] May one software write to the SQLite database while a other read the same SQLite database ?

2008-01-23 Thread drh
Pierre8r <[EMAIL PROTECTED]> wrote: > Hello, > > One SQLite database on my PC. > Two softwares. > May one software write to the SQLite database while a other read the > same SQLite database ? > Your programs cannot be reading and writing at exactly the same instant in time. But both programs

Re: [sqlite] Multiple databases

2008-01-23 Thread drh
"Mina R Waheeb" <[EMAIL PROTECTED]> wrote: > Hi, >I have few questions regarding the limitation of multiple databases with > SQLite. > > I have a large number of SQLite DB files with the same structure i > need to query them all (looking for speed), I have tried ATTACH method > and its

Re: [sqlite] SQLite character comparisons

2008-01-21 Thread drh
John Elrick <[EMAIL PROTECTED]> wrote: > > If we are ignoring trailing spaces, then by definition: > > ' ' = '' > > and for that matter: > > ' ' = ' ' > Good point. I added these as test cases for the new RTRIM collation. http://www.sqlite.org/cvstrac/chngview?cn=4735 -- D.

Re: [sqlite] SQLite character comparisons

2008-01-20 Thread drh
"Fowler, Jeff" <[EMAIL PROTECTED]> wrote: > I'm curious to know how many of you agree with Darren's > sentiments on this issue Changing the behavior of SQLite to ignore trailing spaces is not an option for SQLite version 3, since to do so would result in a incompatible file format All

Re: [sqlite] Performance degradation after 3.3.17 -> 3.5.4 upgrade

2008-01-20 Thread drh
"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > Hello everyone. > I've discover performance degradation due to update 3.3.17 -> 3.5.4. > This SQL query work very slowly: > > DELETE FROM > population_stamp > WHERE > town_id IN ( > SELECT DISTINCT town_id FROM

Re: [sqlite] SQLITE_MAX_EXPR_DEPTH

2008-01-18 Thread drh
Jerry Krinock <[EMAIL PROTECTED]> wrote: > My query: > > DELETE FROM `table1` WHERE (`id`=1 OR `id`=2 OR `id`=3 OR ... OR `id`=N) > > using the C API. When N exceeds 999, I get an error stating that the > maximum depth of 1000 has been exceeded, and this is documented in >

Re: [sqlite] No way to dump a database with large BLOB's ?

2008-01-18 Thread drh
Lothar Scholz <[EMAIL PROTECTED]> wrote: > Hello, > > Dumping a database with images i run into the 1 million byte per > SQL statement limit. I thought that the usual way to backup a database > is the sqlite.exe and dump and eval method. > > Shouldn't this limit be dynamic instead of hard wired

Re: [sqlite] What is the precise definition of an identifier?

2008-01-18 Thread drh
Lothar Scholz <[EMAIL PROTECTED]> wrote: > Hello, > > I have to write an sqlite syntax highligher for an editor > and at the moment i use the following token BNF syntax. > > ident := '_' | letter ( letter | '_' | digit )* > > Is this correct? This is correct depending on your definition of

Re: [sqlite] Why are strings in hexadecimal notation always blobs?

2008-01-18 Thread drh
Lothar Scholz <[EMAIL PROTECTED]> wrote: > > Another question, how would you realiable represent contrl characters > in the range 1-31 in a string? It is not really good to add them as > plain code in text files and SQLite does not have C like backslash > quoting. Especially the automatic

Re: [sqlite] Date arithmetic question

2008-01-17 Thread drh
Gerry Snyder <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should > > return 1 even though the difference is really only 1 second? Seems > > goofy to me > > > > > > I have been staring at this until I'm

Re: [sqlite] sqlite3 performace

2008-01-17 Thread drh
"Philip Nick" <[EMAIL PROTECTED]> wrote: > Greetings, > > Currently I am using sqlite3 in a multi-process/multi-threaded server > setting. > I use a Mutex to ensure only one process/thread can access the database at > one time. > > The current flow of events: > Get Mutex > Open Database

  1   2   3   4   5   6   7   8   9   10   >