Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread drh
"Cesar Rodas" <[EMAIL PROTECTED]> wrote: > Hello. > > I have a question about SQLite join-mechanisms. Let me explain with an > example. > > I have the follow table. > CREATE TABLE a( >word_id INTEGER, >doc_id INTEGER > ); > > CREATE INDEX "a_index1" ON "a"( > "doc_id" ASC > ); > >

Re: [sqlite] Journal files not deleted.

2007-04-12 Thread drh
The original question was something about journal files not being deleted Nobody else has reported seeing this behavior. If you want help, you will have to give us additional information. -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread drh
Consider this query: SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; Is the query above equalent to: (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; Or is it the same as: (2) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 2,1; I need to know

Re: [sqlite] Sqlite3 stable version

2007-04-13 Thread drh
Hamid Benhocine <[EMAIL PROTECTED]> wrote: > Dear drh, > We do want install the latest version of sqlite.for the production ( > 2007-Apr-09 - Version 3.3.15 ) > But, Our sytem group, found the only flaged stable version of the sqlite3 in > the web site is this one ( 2006-J

Re: [sqlite] DELETE row problem

2007-04-14 Thread drh
"dszhang" <[EMAIL PROTECTED]> wrote: > when i delete some row in my table ... i find the sqlite will free > some memory that have been free[d] previous[ly]. > my question is why that thing happen and how to solve it? > SQLite should never call free() on the same piece of memory twice. If it

Re: [sqlite] sqlite3_rowid

2007-04-14 Thread drh
Marco Bambini <[EMAIL PROTECTED]> wrote: > I need a way to automatically have the rowid for all queries issued > by our users (without modifying the original sql queries). > A lot of time for some queries (COUNT(*) for example), it is simply > not possible to obtain a valid rowid, so it could

Re: [sqlite] Need help understanding SQLITE_ERROR[1] problem

2007-04-14 Thread drh
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > In the following pseudo-code which works the first time through either > Function A or Function B I get a problem when either function is > executed a second time. > > I get the following error: > > SQLITE_ERROR[1] - cannot start a transaction

Re: [sqlite] Supporting databases larger than 2GB on FAT filesystems?

2007-04-14 Thread drh
"Ludvig Strigeus" <[EMAIL PROTECTED]> wrote: > Does Sqlite support databases larger than 2GB on FAT filesystems? SQLite supports large databases just fine. It is FAT that does not support large files. > > If not, how hard would it be to add so it uses additional files for the > pages that

Re: [sqlite] trim available ??

2007-04-16 Thread drh
Stef Mientki <[EMAIL PROTECTED]> wrote: > Mohd Radzi Ibrahim wrote: > > Hi, > > I'm running 3.3.15. No problem at all. Maybe your version does not > > have this implemented yet... > > > > I use the SQLITE3.DLL dated 8 october 2006 The TRIM function was added on 2007-03-17 17:52:42. -- D.

Re: [sqlite] #define confliction

2007-04-16 Thread drh
"FUKUDA, Fumiki" <[EMAIL PROTECTED]> wrote: > from 3.3.15, sqlite3's sources are combinded into one sqlite3.c (in > sqlite-source-3_3_15.zip). > when I compile this on VC++8, a warning is reported: > > sqlite3.c(56983) : warning C4005: 'ARRAYSIZE' : macro re-defined. >

Re: [sqlite] Optimize a query

2007-04-17 Thread drh
Martin Pelletier <[EMAIL PROTECTED]> wrote: > This is news to me. Why can't SQlite use more than one index? > It can. You just have to tell it to explicitly by restructuring your SQL. As an example, consider this query: SELECT * FROM table1 WHERE a=5 AND b=11; Suppose there are two

Re: [sqlite] SQLite Performance

2007-04-17 Thread drh
"=?ISO-8859-1?Q?Alberto_Sim=F5es?=" <[EMAIL PROTECTED]> wrote: > > Consider the following database schema: > CREATE TABLE tetragrams (word1 INTEGER, word2 INTEGER, word3 INTEGER, > word4 INTEGER, occs INTEGER, PRIMARY KEY (word1, word2, word3, > word4)); > CREATE INDEX tet_b ON tetragrams

Re: [sqlite] Is this a valid syntax

2007-04-17 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > > Being a C programmer, Richard extended SQLite to allow C syntax for > equality and inequality comparisons as shown at > http://www.sqlite.org/lang_expr.html even though it is non standard. Actually, the reason I did this was because PostgreSQL did it

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread drh
"Joel Cochran" <[EMAIL PROTECTED]> wrote: > should I be using > Transactions for SELECT statements? The only reason to use a transaction around SELECT statements is if you want to make sure that the database is not changed by another process in between consecutive SELECTs. It used to be the

Re: [sqlite] Efficiency and Pragmas

2007-04-18 Thread drh
"Jonas Sandman" <[EMAIL PROTECTED]> wrote: > What is the default setting for PRAGMA cache_size ? > Where is it defined? > The default size is 2000. You can change this at compile-time by setting -DSQLITE_DEFAULT_CACHE_SIZE=12345 -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] how to run tests with amalgamized build?

2007-04-19 Thread drh
E_DEBUG=1 \ -DSQLITE_MEMDEBUG=1 \ -DHAVE_FDATASYNC=1 \ -DTHREADSAFE=0 \ -DHAVE_USLEEP=1 \ -DSQLITE_CRASH_TEST=1 \ -DSQLITE_SERVER=1 \ -DSQLITE_TEST=1 \ -DOS_UNIX=1 \ -DTCLSH=1 \ -I/home/drh/tcltk/85linux \ -I../sqlite/src -I. -Itsrc \ tcl

Re: [sqlite] DROP TABLE slower than DELETE?

2007-04-19 Thread drh
Guy Hindell <[EMAIL PROTECTED]> wrote: > > In promoting SQLite 3 (still v3.2.7, so a bit behind the current > release) for a new project I have been doing some performance tests and > SQLite generally looks very good. However, I have seen one surprising > result. > > My schema is simple, a

Re: [sqlite] sqlite database on a read only media

2007-04-19 Thread drh
"Rich Rattanni" <[EMAIL PROTECTED]> wrote: > All: > Is it possible to have an sqlite database on a read only media? I > will only be issuing SELECT queries on this database. Are there any > pragma's you need to issue to let SQLITE know it is not acceptable to > write to the database file. >

Re: [sqlite] Problem with understanding the test suite

2007-04-20 Thread drh
Justin Fletcher <[EMAIL PROTECTED]> wrote: > do_test select1-11.2.2 { >execsql2 { > SELECT * FROM t3, t4; >} > } {a 3 b 4 a 3 b 4} > > Can someone explain how the test can be correct ? > This comes about because of duplicate column names. The execsql2 procedure looks at all column

Re: [sqlite] Problem with understanding the test suite

2007-04-20 Thread drh
Justin Fletcher <[EMAIL PROTECTED]> wrote: > > As test select1-11.2.1 already produced a useful result > for this class of test and 11.2.2 provides no additional > tests, it is probably redundant as a test there - the > test it's performing is actually being obscured by the > goofy test system

Re: [sqlite] sqlite3 shell doesn't install correctly

2007-04-21 Thread drh
Ulrich =?iso-8859-1?q?Sch=F6bel?= <[EMAIL PROTECTED]> wrote: > On Saturday 21 April 2007 15:40, Joe Wilson wrote: > > > > Apply this patch to fix this problem. > > > > Thanks for the patch, but there is still something wrong in the > linking stage. > I do not understand why you are having

Re: [sqlite] older http://sqlite.org/sqlite-3.x.y.tar.gz downloads no longer available?

2007-04-22 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > I noticed that sqlite tar.gz downloads prior to > > http://sqlite.org/sqlite-3.3.10.tar.gz > > are missing. So historical releases are not available except by CVS. > Is this intentional? > Yes. Why would you want an historical release? Everything

Re: [sqlite] Submitting patches?

2007-04-23 Thread drh
s for SQLite, then you and skip the complications above and self-publish in the contributors section. See http://www.sqlite.org/contrib Write to me privately for a userid and password that will enable you to upload. (drh makes a mental note to improve the formatting of the contributed code sect

Re: [sqlite] An explanation?

2007-04-23 Thread drh
Marco Bambini <[EMAIL PROTECTED]> wrote: > Yes, I know that it is faster ... I just wonder why with one index > the query is slower that without any index... Probably because most of the entries in your table match the term being indexed. In your case, this likely means that a large fraction

Re: [sqlite] Increasing ATTACH_MAX

2007-04-24 Thread drh
"Andrew Finkenstadt" <[EMAIL PROTECTED]> wrote: > I'm exploring what it would take to support more than 10 attached databases > within one SQLite connection object. It appears that the change will be > rather simple: > > ATTACH_MAX can be made as high as 30 without further issues, given the >

Re: [sqlite] Increasing ATTACH_MAX

2007-04-24 Thread drh
"Andrew Finkenstadt" <[EMAIL PROTECTED]> wrote: > > I did not research how prepared statements have their vdbe opcodes > serialized or stored, and whether those opcodes depend on the size of the > Parse structure, whose size would be changing by bumping the writeMask or > cookieMask fields from

Re: [sqlite] Can the memory usage of SQLite be adjusted?

2007-04-24 Thread drh
<[EMAIL PROTECTED]> wrote: > I completed my analysis of the SQLite database memory usage and I was > surprised to find that SQLite consumes so much memory. I ran my test > case (creates 31 tables) and found that SQLite consumed 545,231 bytes of > malloced memory before it started giving it

Re: [sqlite] Copy records from one DB to another

2007-04-24 Thread drh
"Yuriy Martsynovskyy" <[EMAIL PROTECTED]> wrote: > What is the best way to copy records between tables located in > different DB files? > Both DBs have completely the same structure. I need to add records > from table in DB1 to table in DB2. Logically something like this: > > INSERT INTO .table1

Re: [sqlite] Can the memory usage of SQLite be adjusted?

2007-04-24 Thread drh
<[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > <[EMAIL PROTECTED]> wrote: > > > I completed my analysis of the SQLite database memory usage and I was > > > surprised to find that SQLite consumes so much memory. I ran my test > > > case (creates 31 tables) and found that SQLite

Re: [sqlite] test fixture tcl errors on Windows

2007-04-24 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > I'm getting a strange failure of the test suite on Windows (XP all > updates). > exclusive2-2.8... Ok > c:\SQLite\SQLiteV3\build\testfixture.exe: error deleting "test.db": > permission denied > while executing > "file delete -force

Re: [sqlite] more test suite problems on Windows

2007-04-25 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > I'm still troubleshooting the test suite on Windows. > > I'm getting two failures on tests misc7-10 and misc7-11. These test look > like they should work on Windows without change. Can anybody suggest > what might be wrong? > Your previous changes left

Re: [sqlite] lemon compile parse.y error for windows

2007-04-26 Thread drh
[EMAIL PROTECTED] wrote: > > then I use the command > > lemon parse.y > > I successfully get the parse.h file > > but the file is not right. > I only get 137 ids > > the follwing 15 ids do not exist in the parse.h > > TK_TO_TEXT > > TK_CONST_FUNC > You need to run the awk script

Re: [sqlite] An explanation?

2007-04-26 Thread drh
"B V, Phanisekhar" <[EMAIL PROTECTED]> wrote: > How does the index table looks? > > Assume the main table to be: > CREATE TABLE table1 (a INTEGER, b INTEGER) > Assume there is an index on column a: > CREATE INDEX index1 ON table1 (a); > > Now let's suppose the entries

Re: [sqlite] more test suite problems on Windows

2007-04-26 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > > > Your previous changes left the ABC table in a different > > state than what these latter tests expect to see. > > > > > Richard, > > I don't think that is the case Perhaps not. But is was the cause of problems

Re: [sqlite] License Queries

2007-04-26 Thread drh
"P Kishor" <[EMAIL PROTECTED]> wrote: > alright. Let's do it again (DRH can chime in to educate us if I get > it wrong) -- > You got it right as far as I can see. The problem with "public domain" (and this is something I did not know when I put SQLite in the

Re: [sqlite] Recursive triggers

2007-04-26 Thread drh
"Michael Ruck" <[EMAIL PROTECTED]> wrote: > Hello, > > I've been looking into the way triggers are implemented and was thinking > about adding support for recursive triggers, as they would simplify my > current project dramatically. What was/is the reason to leave them out? > > My thoughts were

Re: [sqlite] more test suite problems on Windows

2007-04-26 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > > Have you tried to run the latest laststmtchanges.test on Windows? I am > still getting a failure that shows the same double counting that was > originally reported on the mailing list. > > laststmtchanges-1.2.1... > Expected: [5] >

Re: [sqlite] more test suite problems on Windows

2007-04-27 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > > Do you, or anyone else, know why the linux version would not be > committing its changes to disk? > When testing, it is my usual practice to compile with -DSQLITE_NO_SYNC=1 which turns off disk syncing. This very definitely makes the tests run way

Re: [sqlite] CREATE TABLE fails if SQL starts with comment

2007-04-27 Thread drh
"Yuriy Martsynovskyy" <[EMAIL PROTECTED]> wrote: > When I execute the SQL code below on a newly created DB file I get an > error 'table Tab already exists', and it creates a table > > -- comment > CREATE TABLE Tab(ID); > > Code below works without error messages: > > CREATE TABLE Tab(ID); > I

Re: [sqlite] May I ask why the source distribution mechanism was changed starting with 3.3.14?

2007-04-30 Thread drh
Martin Jenkins <[EMAIL PROTECTED]> wrote: > > As fas as I know, the dev team is Dr Hipp and Dan Kennedy (apologies if > there's someone else and I missed you) and I agree, it is slightly odd > for neither of them to reply. > Why is it odd? The issue is not something that needs replying to.

Re: [sqlite] Amalgamation and CPP defines

2007-05-02 Thread drh
Tomash Brechko <[EMAIL PROTECTED]> wrote: > [H]ow to properly compile the amalgamation wrt C preprocessor > defines? Suppose I got sources tarball, and did './configure > --some-options CFLAGS=...'. This produces a Makefile, I can do 'make > sqlite3.c', but I also would like to be able to do

Re: [sqlite] May I ask why the source distribution mechanism was changed starting with 3.3.14?

2007-05-02 Thread drh
"C.Peachment" <[EMAIL PROTECTED]> wrote: > > After clearing these warnings, I discovered that the Pelles C > compiler was unable to complete the compilation of sqlite3.c > and timed out after 300 seconds. So it appears that I need > to revert to separate source files that were available with >

Re: [sqlite] Transaction journal corrupted by antivirus

2007-05-03 Thread drh
Voxen <[EMAIL PROTECTED]> wrote: > The problem is my application is used by thousand of customers. > I cannot ask them to tweak their antivirus. > > > > > How can I work around this? > > Do I need to ZIP or encode the email message before storing it in the > > database? > > If the antivirus is

Re: [sqlite] [BUG or FR] OpenEphemeral invariant optimization (was [sqlite] Best way to optimize this query?)

2007-05-03 Thread drh
Tomash Brechko <[EMAIL PROTECTED]> wrote: > > sqlite> .explain > sqlite> explain SELECT * FROM People where GUID in ("ABC", "RDT", "TUV"); > addr opcode p1 p2 p3 > -- -- -- --- > > 2 OpenRead0

Re: [sqlite] May I ask why the source distribution mechanism was changed starting with 3.3.14?

2007-05-04 Thread drh
"C.Peachment" <[EMAIL PROTECTED]> wrote: > With the suggestion that the problem was a compiler bug > in PellesC for Windows, I posted a message on their forum. > One response suggested a couple of configuration changes > and also said to wait a while because it took a long time to > compile. >

[sqlite] Ticket #2339

2007-05-06 Thread drh
Will the anonymous user who contributed the remark to ticket #2339 on 2007-May-06 18:03:48 that contains a 6-line patch for fixing the ticket, please identify yourself to me. Tnx. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] reseting primary key

2007-05-07 Thread drh
"Jonathan Kahn" <[EMAIL PROTECTED]> wrote: > > I have tried different things such as reindex and vacuum on my primary key > auto inc field but I cannot reset it so that things start from one. I > deleted everything from my table but it still keeps the amount that was > there beforehand on the

Re: [sqlite] Limiting the size of a database?

2007-05-07 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > I wrote too soon: > > http://www.sqlite.org/cvstrac/chngview?cn=3941 > > + /* > + ** Maximum number of pages in one database file. > + */ > + #ifndef SQLITE_MAX_PAGE_COUNT > + # define SQLITE_MAX_PAGE_COUNT 1073741823 > + #endif > This #define doesn't

Re: [sqlite] Limiting the size of a database?

2007-05-07 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > Joe Wilson <[EMAIL PROTECTED]> wrote: > > > I wrote too soon: > > > > > > http://www.sqlite.org/cvstrac/chngview?cn=3941 > > > > > > + /* > > > + ** Maximum number of pages in one database file. > > > + */ > > > + #ifndef

Re: [sqlite] Column naming between 3.2.0 and 3.2.8

2007-05-08 Thread drh
Eric Boudaillier <[EMAIL PROTECTED]> wrote: > > I started with sqlite 3.2.0. Now I try to use the version 3.2.8, Why not use 3.3.17? > With sqlite 3.2.0, "arr" contains: > > arr(*) = equipment_type_name io_type_id io_type_name > alarm_if_active > arr(alarm_if_active) =

Re: [sqlite] perfomance degradation for expr "foo = X or bar =X"

2007-05-09 Thread drh
Tomash Brechko <[EMAIL PROTECTED]> wrote: > > sqlite> explain query plan > ...> SELECT id, n1, n2 > ...> FROM tbl > ...> WHERE n1 = $I > ...> UNION > ...> SELECT id, n1, n2 > ...> FROM tbl > ...> WHERE n2 = $I > ...> ORDER BY id DESC; >

Re: [sqlite] perfomance degradation for expr "foo = X or bar =X"

2007-05-09 Thread drh
bash <[EMAIL PROTECTED]> wrote: > > Oh... so this is implementation limitation. > Im currently thinking about this table: > > CREATE TABLE map ( > x int, > y int, > name char > ); > CREATE INDEX map_x ON map(x); > CREATE INDEX map_y ON map(y); > > And query for it will be

Re: [sqlite] perfomance degradation for expr "foo = X or bar =X"

2007-05-09 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > > > > Why full table scan? :/ > > SQLite can takes set (1) of rowid by ex(x) index for > > "X=5". Then takes another set (2) of rowid by ex(y) for "Y=7". > > Then SQLite need only to union this two set (1) and (2). > > Final SQLite should returns rows where

Re: [sqlite] Variable substitution for table names

2007-05-09 Thread drh
"Jeff Hamilton" <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a complex query that I want to run often and store the results > to a temporary table. I'd like to compile a statement that looks > something like: > > CREATE TEMP TABLE ? AS SELECT * FROM data WHERE value = ?; > > so that I can

[sqlite] Longest "real" SQL statement

2007-05-09 Thread drh
I'm looking for an upper bound on how big legitimate SQL statements handed to SQLite get to be. I'm not interested in contrived examples. I want to see really big SQL statements that are actually used in real programs. "Big" can be defined in several ways: * Number of bytes of text in

Re: [sqlite] Longest "real" SQL statement

2007-05-09 Thread drh
Dave Dyer <[EMAIL PROTECTED]> wrote: > I've recently been storing images in Sqlite datbases, and > for various reasons don't want to use the normal "blob" > mechanisms. Consequently, a 10mb JPG image file would be > encoded as slightly larger than 10mb sqlite "insert xx" command. > The use of

Re: [sqlite] sqlite3_last_insert_rowid : what will it return if we have more than one table?

2007-05-10 Thread drh
"B V, Phanisekhar" <[EMAIL PROTECTED]> wrote: > Assume I have two tables A and B in the databse. > > > > sqlite3_last_insert_rowid will return the rowid of which table? > The one you last inserted into. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] indexing large databases

2007-05-10 Thread drh
Kasper Daniel Hansen <[EMAIL PROTECTED]> wrote: > Hi > > We are using SQLite for a fairly big (but simple) calculation, and > have some problems when creating an index on a database with > 600.000.000 rows. Specifically it has not ended even after 5 days of > running. We have done it

Re: [sqlite] indexing large databases

2007-05-10 Thread drh
Kasper Daniel Hansen <[EMAIL PROTECTED]> wrote: > > Having said that, I can understand that sorting and disk cache and so > on factors in - but my initial database is already very large (1.3GB > - 145.000.000 milion rows), and surely that disk cache would already > factor in at that stage?

Re: [sqlite] sqlite on VPS configurations

2007-05-10 Thread drh
Dave Dyer <[EMAIL PROTECTED]> wrote: > Is there any suspicion that sqlite might fail on virtual > unix server configurations? The http://www.sqlite.org/ website is on a virtual unix server. It uses SQLite extensively without any problems. But I guess it really depends on what virtual unix

Re: [sqlite] SQLITE_CORRUPT recover

2007-05-11 Thread drh
"Sabyasachi Ruj" <[EMAIL PROTECTED]> wrote: > Hi, > Is there any way to programmatically fix a corrupted sqlite database? > I am using sqlite version 3.3.8 with C APIs > Sometimes VACUUM or REINDEX will help, but usually not. You can also try to recover using: sqlite3 OLD.DB .dump | sqlite3

Re: [sqlite] Multiple connections to the same database and CREATE TABLE command

2007-05-11 Thread drh
"Vivien Malerba" <[EMAIL PROTECTED]> wrote: > Hi! > > In a single process, I open two connections (C1 and C2) to the same > database (this is actually a corner case which could happen) and the > following sequence of operations fail: > 1- on C1 execute "CREATE table actor (...)" => Ok > 2- on C1

Re: [sqlite] Check-ins [3987,3988] : Fix an obscure b-tree bug that applied to transient trees used for IN(...) expressions.

2007-05-12 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > Does anyone know if this bug was the result of a recent btree optimization, > or was it a longstanding issue? > I think it has been in the tree since version 3.0.0. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Problem with Unicode surrogates

2007-05-12 Thread drh
"Jiri Hajek" <[EMAIL PROTECTED]> wrote: > > What I would propose is to be more robust in handling such incorrect Unicode > strings, so that application can e.g. insert really any string, not only > those that comply Unicode standards. > Doing this can potentially lead to security exploits in

Re: [sqlite] runtime errors in DEBUG with byte overflow in RC4-based random (3.3.15)

2007-05-15 Thread drh
"Andrew Finkenstadt" <[EMAIL PROTECTED]> wrote: > > Any objections to taking back patches that bit-wise and the result of the > overflowing addition with 0xff ? > The variables being added are unsigned chars and the result is stored in an unsigned char. Am I to understand that you have a

Re: [sqlite] Using ICU with amalgamation package

2007-05-16 Thread drh
"Klemens Friedl" <[EMAIL PROTECTED]> wrote: > I would like to use the "ICU" extention (cvs: "sqlite\ext\icu.c") in > combination with a preprocessed source code of SQLite3 for Win32. > > Is it possible to build sqlite.dll with the big sqlite3.c plus > extentions (e.g. icu.c) ? Sure. It's all C

Re: [sqlite] Override LIKE

2007-05-16 Thread drh
"Jonas Sandman" <[EMAIL PROTECTED]> wrote: > > I want LIKE to work just as well for non-ANSI characters, I think the > solution is to override LIKE with sqlite3_create_function but is there any > examples on how to use this function? > The built-in LIKE operator is created using the

Re: [sqlite] One more SQLite threading question

2007-05-17 Thread drh
"Martin Gentry" <[EMAIL PROTECTED]> wrote: > Just as an FYI on the threading ... > http://www.sqlite.org/capi3ref.html#sqlite3_open > > "The returned sqlite3* can only be used in the same thread in which it was > created. It is an error to call sqlite3_open() in one thread then pass the >

Re: [sqlite] bizarre query problem

2007-05-22 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > Just for kicks, what happens on both platforms when you issue: > > select genre, length(genre), hex(genre), filename > from objects where media_type=1; > Make that: select genre, typeof(genre), length(genre), hex(genre), filename from objects

Re: [sqlite] Does sqlite3_step searches for a row in the table / or some results buffer?

2007-06-06 Thread drh
"Tom Briggs" <[EMAIL PROTECTED]> wrote: > The insert will not be allowed until the query is closed, so you > can't get into this situation. > This used to be the case. But as of version 3.3.8, you can in fact issue an UPDATE, INSERT, or DELETE against a table while a SELECT is running on that

Re: [sqlite] error in round-function?

2007-06-10 Thread drh
Olaf Schmidt <[EMAIL PROTECTED]> wrote: > The integrated round-function works well so far, > especially because it does "bankers rounding". > Tough it seems to have a little bug, wich is probably simple to fix. > > Try... > select round(0.94, 1) -> gives 0.9, wich is correct > select round(0.96,

Re: [sqlite] error in round-function?

2007-06-10 Thread drh
Olaf Schmidt <[EMAIL PROTECTED]> wrote: > > select round(0.95, 1) > gives 0 - not 0.9 (in case rounding down) and > also not 1.0 (in case rounding up) > I can reproduce the problem by running sqlite3.exe on windows. But I cannot explain it. The problem occurs in printf.c on line 454:

Re: [sqlite] Why is there no sqlite3_exec16() method?

2007-06-11 Thread drh
"Rob Richardson" <[EMAIL PROTECTED]> wrote: > > So, let's say we want to delete a record using "DELETE FROM my_table = > WHERE my_key = my_unwanted_value". I would just pass that string into = > sqlite3_prepare16(), then call sqlite3_step() to actually do the = > deletion (and return

Re: [sqlite] Database malformed with SQLite3.3.17 on WindowsXP

2007-06-11 Thread drh
=?iso-2022-jp?B?GyRCNkxAbhsoQiAbJEJONTtKIWMbKEJlLRskQiU9JWolZSE8JTcbKEI=?= =?iso-2022-jp?B?GyRCJWclczt2NkhJdDMrSC9JdDMrSC8yXSFkGyhC?= <[EMAIL PROTECTED]> wrote: > > I encountered a problem with SQLite3.3.17 on Windows XP. Under certain > situation, > database file got seriously

[sqlite] Re: sqlite_omit_xx build failure

2007-06-11 Thread drh
"weiyang wang" <[EMAIL PROTECTED]> wrote: > hi, > > i am trying to get a smaller sqlite lib by adding sqlite_omit_xx defines. > but it failed at the compiler time. > > steps: > 1, in 'Makefile.in', omit macro is added: > > TCC += -DSQLITE_OMIT_ALTERTABLE=1 > > 2, run '(top)/configure' and

Re: [sqlite] Database replication question

2007-06-12 Thread drh
[EMAIL PROTECTED] wrote: > > The table I have is something like > CREATE TABLE sn2uid( >sn VARCHAR(100) NOT NULL, >uid INTEGER NOT NULL, >PRIMARY KEY (sn) > ); > CREATE INDEX uidindex on sn2uid ( uid ) > > > is there a way to do a select or a .dump so that when inserting the > data

Re: [sqlite] PRAGMA cache_size = 0

2007-06-12 Thread drh
"B V, Phanisekhar" <[EMAIL PROTECTED]> wrote: > I am yet to get answers for the following questions. > Weiyang Wang correctly answered your question at http://www.mail-archive.com/sqlite-users%40sqlite.org/msg25290.html -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Database malformed with SQLite3.3.17 on WindowsXP

2007-06-12 Thread drh
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I've opened a new ticket 2409. > > http://www.sqlite.org/cvstrac/tktview?tn=2409,38 > I am so far unable to reproduce the problem. Please send me an example corrupt database and the binaries for SQLiteCrush.exe. Tnx. You can send them to me by

Re: [sqlite] Database malformed with SQLite3.3.17 on WindowsXP

2007-06-12 Thread drh
[EMAIL PROTECTED] wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I've opened a new ticket 2409. > > > > http://www.sqlite.org/cvstrac/tktview?tn=2409,38 > > > > I am so far unable to reproduce the problem. Please send > me an example corrupt database and the binaries for >

Re: [sqlite] Database replication question

2007-06-12 Thread drh
[EMAIL PROTECTED] wrote: > > - Original Message > > From: Joe Wilson <[EMAIL PROTECTED]> > > To: sqlite-users@sqlite.org > > Sent: Monday, June 11, 2007 8:36:32 PM > > Subject: Re: [sqlite] Database replication question > > > > > > Large bulk inserts with more than one index (implicit

Re: [sqlite] version 3.3.15, is SQLITE_BUSY_RESERVED_LOCK implemented

2007-06-12 Thread drh
"Andrew Finkenstadt" <[EMAIL PROTECTED]> wrote: > I see a reference to SQLITE_BUSY_RESERVED_LOCK in version 3.3.15 (the first > one with the amalgamation), but there does not appear to be support for it > in the remainder of the source file. > > Is that correct? So it appears -- D. Richard

Re: [sqlite] Is it a bug?

2007-06-14 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > > As a possible extension one could see sqlite3_create_function taking an > optional argument with a hint as to its return type that sqlite may use > for sqlite3_column_decltype. But SQLite does not currently return any > column types for any ad-hoc

[sqlite] Version 3.4.0

2007-06-18 Thread drh
SQLite version 3.4.0 is now available for download from the SQLite website and from the back-up site: http://www.sqlite.org/ http://www.hwaci.com/sw/sqlite/ Version 3.4.0 fixes two bugs which can cause database corruption. Upgrading is recommended for all users. If you are compelled to

Re: [sqlite] SQLITE_CORRUPT recover

2007-06-18 Thread drh
"Sabyasachi Ruj" <[EMAIL PROTECTED]> wrote: > I still fail to understand what should I synchronize on. I am *not* sharing > sqlite* across multiple threads. > If you compile SQLite so that it is threadsafe (-DTHREADSAFE=1) and if you do not share sqlite3* pointers across threads, then you should

Re: [sqlite] Version 3.4.0

2007-06-18 Thread drh
Gerry Snyder <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > SQLite version 3.4.0 is now available for download > > > > The tcl bindings for windows appear to be missing. Is this deliberate? > Build-script bug. Now fixed. Try again, please. (Note that I have observed that

Re: [sqlite] Version 3.4.0

2007-06-18 Thread drh
"Andreas Kupries" <[EMAIL PROTECTED]> wrote: > > SQLite version 3.4.0 is now available for download from the SQLite > > website and from the back-up site: > > > > Version 3.4.0 also includes support for new features such as: > > > >* Incremental BLOB I/O > > > > Additional information about

Re: [sqlite] Version 3.4.0

2007-06-18 Thread drh
Gerry Snyder <[EMAIL PROTECTED]> wrote: > > (bin) 1 % load /sqlite/tclsqlite3.dll > couldn't find procedure Tclsqlite_Init > (bin) 2 % > yes. I messed up the build again. Please try one more time. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Tcl and BLOB data

2007-06-19 Thread drh
"Jeff Godfrey" <[EMAIL PROTECTED]> wrote: > > Is there a way I can "force" SQLite to insert my data as a BLOB, even if the > containing variable has a string representation? I tried to CAST the data to > a BLOB during the insert, but the results were the same. > If you get the patch I just

Re: [sqlite] Tcl and BLOB data

2007-06-19 Thread drh
"Jeff Godfrey" <[EMAIL PROTECTED]> wrote: > Interesting. That sounds like exactly what I need. I'm curious, did > the patch somehow arise from my query, or is the timing of the query > and the patch just coincidental? > > Also, how soon would you expect this patch to make it into an >

Re: [sqlite] The problem with index

2007-06-20 Thread drh
Gerry Snyder <[EMAIL PROTECTED]> wrote: > Igor Tandetnik wrote: > > Sergey M. Brytsko <[EMAIL PROTECTED]> > > wrote: > >> But what about the following values: > >> > >> 1 1 2 2 100 100 100 100 100 100 100 100 100 100 100 111 111 > > > > If you susptect your data is likely to look like this, you

Re: [sqlite] Alternative index methods (hash key)

2007-06-20 Thread drh
"Scott Hess" <[EMAIL PROTECTED]> wrote: > On 6/20/07, Andrew Finkenstadt <[EMAIL PROTECTED]> wrote: > > How difficult do you think it would be to support an alternative method of > > indexing within SQLite specifically to support O(1) retrieval of the rowid > > for a table, and then potentially

Re: [sqlite] Calling sqlite3_exec from within another sqlite3_exec callback?

2007-06-21 Thread drh
Stefan Kuhr <[EMAIL PROTECTED]> wrote: > Hello everyone, > > this might be a real dumb question, but I am relatively new to database > programming and in particular to sqlite, so anyway, here it goes: > > Suppose I have a call to sqlite3_exec in my code and it calls into the > callback function

Re: [sqlite] Tomcat crashes with SQLite

2007-06-24 Thread drh
"Frederic de la Goublaye" <[EMAIL PROTECTED]> wrote: > My server crashed again. > > I recompiled sqlite3-3-5 with this configure option > --enable-threadsafe =yes > > But I read that sqlite has somebug under Unix with the management of the > THREADS. > Some version so of Linux have a bug.

Re: [sqlite] How to sort not binary?

2007-06-24 Thread drh
Yves Goergen <[EMAIL PROTECTED]> wrote: > On 22.06.2007 17:48 CE(S)T, Yves Goergen wrote: > > Match m1 = Regex.Match(param1, "^([0-9]+)"); > > if (m1.Success) > > { > > Match m2 = Regex.Match(param2, "^([0-9]+)"); > > if (m2.Success) > > { > > int cmpNum =

Re: [sqlite] In Mem Query Performance

2007-06-25 Thread drh
RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: > Hi, > > When the DB is opened in "in Memory mode",performance of query does not > improve. For table which has 10 columns of type Text and each column having > 128bytes data and having a total of 1 records. Performance is around 2400 >

Re: [sqlite] Tomcat crashes with SQLite

2007-06-25 Thread drh
"Frederic de la Goublaye" <[EMAIL PROTECTED]> wrote: > My server is under FreeBSD 5.4 > It is ok ? > I am not aware of any problems with FreeBSD 5.4. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email

Re: [sqlite] Index size

2007-06-25 Thread drh
"Andre du Plessis" <[EMAIL PROTECTED]> wrote: > I have a question on index size, I have a table that by doing some > testing the DB have grown to 250MB, might not seem too large, as the > table have 4million records in it. But for this DB this table would grow > a lot larger than that. So I did

Re: [sqlite] Unicode collation

2007-06-25 Thread drh
"Jiri Hajek" <[EMAIL PROTECTED]> wrote: > Ok, drh, could you share your thoughts about this. Could something > like this, i.e. some kind of recommendation be created, so that all > applications are consistent in Unicode support? > Dan's observation is correct. It se

Re: [sqlite] Sqlite,'C' & FTS - reg

2007-06-25 Thread drh
Zoobave <[EMAIL PROTECTED]> wrote: > Hello group, > > In sqlite, how to load fts1 module in 'C'? I couldn't execute the > *"select load_extension('libfts1.so');" * query using "sqlite3_exec" > function. How can i execute the above query to load fts1 module, in order > to use virtual

Re: [sqlite] Unicode collation

2007-06-25 Thread drh
"Jiri Hajek" <[EMAIL PROTECTED]> wrote: > > So the choices seem to be: > > > > (1) Databases that corrupt if you move across platforms. > > (2) A 10MB database engine > > (3) Leave things as they are > > > > I prefer to go with (3) > > Yes, based on the facts I agree that (3) is the best way

  1   2   3   4   5   6   7   8   9   10   >