Re: [sqlite] SQLite and nested transactions

2007-04-11 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > --- [EMAIL PROTECTED] wrote: > > > It may be more difficult to implement this in a backwards-compatible > > > way such that older versions of SQLite can rollback a journal created > >

Re: [sqlite] 3.3.15 test coverage improvements? (.dump again)

2007-04-11 Thread Joe Wilson
Unfortunately, the sqlite3 commandline shell is not part of the test suite despite its widespread use as an administrative tool for sqlite databases. http://marc.info/?l=sqlite-users=117253099812346=2 But you know this already - you're the same guy as this previous post. :-) --- Travis

RE: [sqlite] File size issue?

2007-04-11 Thread Joe Wilson
> What is worse is that VACUUM didn't really help that much. It takes > forever, and it doesn't really "fix" the fragmentation either. That used to be the case, but VACUUM is vastly improved in the latest version of SQLite.

Re: [sqlite] Select columns & performance

2007-04-11 Thread Joe Wilson
--- Mike Johnston <[EMAIL PROTECTED]> wrote: > Are there any significant performance benefits by limiting the number of > columns in a single > table select statement? Does joining (<5 tables) make a significant > difference to that answer? If you need the columns, you don't have much choice

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > 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

Re: [sqlite] Database performance

2007-04-15 Thread Joe Wilson
--- "Andrey A. Lapin" <[EMAIL PROTECTED]> wrote: > I develop database in which information on the traffic (headings of packets > MAC, TCP/IP) is stored. > Processing of queries occurs slowly. > For example, quantity of records in a database of 17 million lines and its > size 3 Gb. > How to

Re: [sqlite] Journal file question

2007-04-18 Thread Joe Wilson
--- DragonK <[EMAIL PROTECTED]> wrote: > I'm having the following problem: a sqlite database file is on an NTFS > filesystem, in a directory with no permissions to create new files, but only > to modify the original database. By using filemon i've noticed some access > denied errors when sqlite

Re: [sqlite] How is the windows binary built?

2007-04-20 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > I'm using cygwin under windows XP. > gcc version 3.4.4 > > I unzipped the sqlite-3.3.16.tar.gz to the directory sqlite-3.3.16. > > Executed the following: > > cd sqlite-3.3.16 > mkdir build > cd build > ./configure > make > > The resulting sqlite3.exe is 4 times

Re: Re: [sqlite] How is the windows binary built?

2007-04-21 Thread Joe Wilson
--- Miha Vrhovnik <[EMAIL PROTECTED]> wrote: > > strip sqlite3.exe > is not ok at least for DLL, because it strips everything even reallocation > info. > strip --strip-unneeded sqlite3.dll The GNU toolchain's strip command corrupts the reallocation information for MinGW DLLs, so I would not

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

2007-04-21 Thread Joe Wilson
> I've used SQLite-3.3.4 for quite a while, mostly the Tcl binding. > A few days ago I installed 3.3.15 and the Tcl binding worked fine. > Tonight I downloaded 3.3.16 and compiled it without any errors > or warnings and then installed it. When I tried to execute sqlite3 > the following error

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

2007-04-22 Thread Joe Wilson
> I've used SQLite-3.3.4 for quite a while, mostly the Tcl binding. > A few days ago I installed 3.3.15 and the Tcl binding worked fine. > Tonight I downloaded 3.3.16 and compiled it without any errors > or warnings and then installed it. When I tried to execute sqlite3 > the following error

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

2007-04-22 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > 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 t

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

2007-04-22 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote: > In general, sqlite3.so is backwards compatible, but not necessarily > forward compatible. So you can upgrade an older binary to use a more > recent 3.x sqlite3.so release, but not the other way around. I meant to to say: In gene

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

2007-04-22 Thread Joe Wilson
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? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam

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

2007-04-22 Thread Joe Wilson
--- Ulrich Schöbel <[EMAIL PROTECTED]> wrote: > Thanks for the patch, but there is still something wrong in the > linking stage. > > I have 3 instances of SQLite on my system: > The first is 3.2.1, installed with the system and not used, at least > not by me, library in /usr/lib. > The second is

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

2007-04-22 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > 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. > &

Re: [sqlite] v3.6.16-threads fails to build via freebsd ports sys

2007-04-22 Thread Joe Wilson
This libtool --tag problem does not seem to be unique to sqlite. http://lists.freebsd.org/pipermail/freebsd-questions/2005-November/104076.html I think it's a question for the freebsd port maintainers. --- snowcrash <[EMAIL PROTECTED]> wrote: > hi, > > building v3.3.16 from src on osx works

Re: [sqlite] test fixture tcl errors on Windows

2007-04-24 Thread Joe Wilson
The test script itself has the test.db open, and as result Windows cannot delete an open file. It worked on UNIX because you can delete anything at any time whether it is open, running, locked or whatever. If you apply this patch, exclusive2.test will run to completion on cygwin without error.

Re: [sqlite] test fixture tcl errors on Windows

2007-04-24 Thread Joe Wilson
a better patch... Index: test/exclusive2.test === RCS file: /sqlite/sqlite/test/exclusive2.test,v retrieving revision 1.4 diff -u -3 -p -r1.4 exclusive2.test --- test/exclusive2.test16 Apr 2007 15:02:20 - 1.4 +++

Re: [sqlite] how to compile sqlite3 in ads1.2 environment?

2007-04-25 Thread Joe Wilson
What's an ads1.2? --- [EMAIL PROTECTED] wrote: > Dose anybody compile the sqlite3 in the ads1.2 environment? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Re: [sqlite] how to compile sqlite3 in ads1.2 environment?

2007-04-25 Thread Joe Wilson
Try compiling with sqlite3.c from http://sqlite.org/sqlite-source-3_3_17.zip It is already pre-generated and does not require generating the parser from the .y file. See: http://www.sqlite.org/cvstrac/wiki?p=TheAmalgamation --- [EMAIL PROTECTED] wrote: > arm developer suite v1.2 > support

Re: [sqlite] sqlite and borland c++ builder

2007-04-28 Thread Joe Wilson
> When I try to use the header I get errors > > [C++ Error] sqlite3.h(1778): E2232 Constant member > 'sqlite3_index_info::nConstraint' in class without constructors It appears it is trying to compile the sqlite header file as if it were C++. Lemme guess - you're using the almalgomated

Re: [sqlite] sqlite and borland c++ builder

2007-04-28 Thread Joe Wilson
I wrote too quickly - sqlite3.h correctly uses __cplusplus for extern "C". But the almalgomated sqlite3.c cannot be compiled from a C++ compiler for the reasons described below. --- Joe Wilson <[EMAIL PROTECTED]> wrote: > > When I try to use the header I get error

RE: [sqlite] sqlite and borland c++ builder

2007-04-29 Thread Joe Wilson
--- Jonathan Kahn <[EMAIL PROTECTED]> wrote: > I really appreciate your response. What do you suggest I do? Is there > something else I need to include aside from sqlite3.lib? I am willing to > try anything. I only use GNU C++, so I can't help you with .lib files. I'd suggest to compile

Re: [sqlite] Curious performance issue with large number of inserts

2007-05-05 Thread Joe Wilson
> create table filemap(id integer primary key, >uid integer, gid integer, mtime integer, >vol integer, >path varchar(1024)); > > It has no indices built yet. > > I'm adding quite a lot of records to it using a perl script which > generates SQL like this: > > begin; > insert into

Re: [sqlite] Curious performance issue with large number of inserts

2007-05-05 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote: > > create table filemap(id integer primary key, > >uid integer, gid integer, mtime integer, > >vol integer, > >path varchar(1024)); > > > > It has no indices built yet. > > > > I'm a

Re: [sqlite] Curious performance issue with large number of inserts

2007-05-05 Thread Joe Wilson
--- Tim Bradshaw <[EMAIL PROTECTED]> wrote: > > I can't reproduce your problem. I can insert 16M records into your > > table > > schema in 25 minutes on a 5 year old Windows machine. The sqlite3 > > process > > had peak RAM usage of less than 20M. > > Rats, I suspect it must be some

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

2007-05-07 Thread Joe Wilson
--- Ron Stevens <[EMAIL PROTECTED]> wrote: > Is it possible to tell SQLite to limit the size that a database may > grow to? It would be useful for storage constrained applications. This is a tricky problem. What would you have the database do if an insert failed upon reaching the limit? What

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

2007-05-07 Thread Joe Wilson
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 --- Joe Wilson <[EMAIL PROTECTED]> wrote: > --- Ron Stevens <[EMA

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

2007-05-07 Thread Joe Wilson
--- [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 S

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

2007-05-12 Thread Joe Wilson
Does anyone know if this bug was the result of a recent btree optimization, or was it a longstanding issue? Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV.

Re: [sqlite] Different VDBE opcodes for the same query

2007-05-13 Thread Joe Wilson
> The DB schema is: > CREATE TABLE xxx(a TEXT, b TEXT, c TEXT); > CREATE INDEX idx on xxx(b); > > The command > explain select rowid, a, b, c from xxx where b in('qwerty') order by rowid; > shows 58 opcodes. > > The command > explain select rowid, a, b bbb, c from xxx where bbb in('qwerty')

Re: [sqlite] Different VDBE opcodes for the same query

2007-05-13 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote: > > The DB schema is: > > CREATE TABLE xxx(a TEXT, b TEXT, c TEXT); > > CREATE INDEX idx on xxx(b); > > > > The command > > explain select rowid, a, b, c from xxx where b in('qwerty') order by rowid;

[sqlite] NameContext.nRef question

2007-05-13 Thread Joe Wilson
Is the sole purpose of NameContext.nRef to see whether you're dealing with a correlated subquery? We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list.

Re: [sqlite] WG: indexing large databases

2007-05-14 Thread Joe Wilson
--- Juri Wichanow <[EMAIL PROTECTED]> wrote: > > In my database of 30 000 000 records. > > At " Pragma cache_size = 100 " indexation lasts > 12 hours, > > at " Pragma cache_size = 2000 " - 45 minutes. It would be interesting if you ran a profiler such as gprof during each run to see

Re: [sqlite] Different VDBE opcodes for the same query (part 2)

2007-05-14 Thread Joe Wilson
--- "Sergey M. Brytsko" <[EMAIL PROTECTED]> wrote: > Hi All! > > The DB schema is: > CREATE TABLE xxx(a TEXT, b INTEGER, c TEXT); > CREATE INDEX idx on xxx(b); > > explain query plan select rowid, a, b, c from xxx where b > 1 order by > rowid; > 0|0|TABLE xxx USING PRIMARY KEY ORDER BY >

Re: [sqlite] replace function?

2007-05-15 Thread Joe Wilson
No error when run with most recent SQLite. replace() may not have existed in 3.3.7. --- Jim Dodgen <[EMAIL PROTECTED]> wrote: > I get an error in version 3.3.7 when using the replace function as defined > here: > > http://sqlite.org/lang_expr.html > > "replace(X,Y,Z) Return a string

[sqlite] PATCH: updated compound query WHERE clause optimization

2007-05-16 Thread Joe Wilson
This updated patch greatly improves query times against compound SELECT statements (i.e., UNIONs) when the parent SELECT has a WHERE clause. For example, this query: SELECT * FROM ( SELECT a,b FROM t1 UNION ALL SELECT x,y FROM t2 ) WHERE a>b; will be transformed into the more

Re: [sqlite] PATCH: updated compound query WHERE clause optimization

2007-05-19 Thread Joe Wilson
Improved patch against latest CVS with more comments and new test case attached. No regressions with make test. > This updated patch greatly improves query times against compound > SELECT statements (i.e., UNIONs) when the parent SELECT has a WHERE > clause.

[sqlite] R-Trees and SQLite

2007-05-20 Thread Joe Wilson
In a previous post drh mentioned: You need an R-Tree index to do something like this. The public-domain version of SQLite only supports B-Tree indices. (http://www.mail-archive.com/sqlite-users%40sqlite.org/msg24643.html) Does this imply that there exists a commercial version of SQLite

Re: [sqlite] SQL error: disk I/O error

2007-05-21 Thread Joe Wilson
If you're using Linux, try: echo "create table t1(a);" |strace ./sqlite3 my.db 2>&1 |less and examine the output. See where it differs from the successful tmpfs run. Newer versions of sqlite3 may have better IO error messages. > I'm running the command line tool to create sqlite3 db. > My

Re: [sqlite] bizarre query problem

2007-05-22 Thread Joe Wilson
Nothing you've mentioned is out of the ordinary. I would expect the same behavior on both platforms. Can you post the complete schema, and the exact query that exhibits the problem? (And perhaps a couple of insert statements into the objects table). Without this I don't think anyone can recreate

Re: [sqlite] bizarre query problem

2007-05-22 Thread Joe Wilson
Just for kicks, what happens on both platforms when you issue: select genre, length(genre), hex(genre), filename from objects where media_type=1; as well as: select count(*) from objects where genre LIKE '%POP%'; > I have a bizarre problem. Here is an example of something I tried in >

Re: [sqlite] SQL error: disk I/O error

2007-05-22 Thread Joe Wilson
What is the OS you're using and what kind of media is it? Hard drive or USB key or ??? --- Shilpa Sheoran <[EMAIL PROTECTED]> wrote: > It seems that rc = fsync(fd); is failing in function > static int full_fsync(int fd, int fullSync, int dataOnly) in file os_unix.c > { > #else /* if

Re: [sqlite] About a Vista problem

2007-05-23 Thread Joe Wilson
--- "Tian-Jian \"Barabbas\" [EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi Millan, > > I encountered the same problem, the record is on > > http://b6s.blogspot.com/2007/04/previous-version-ghost-on-vista-can-be.html > > and the issue was sent to > >

Re: [sqlite] Is .dump the definitive backup method for sqlite?

2007-05-23 Thread Joe Wilson
--- Nigel Metheringham <[EMAIL PROTECTED]> wrote: > I recently experimented with putting binary data into SQLite table > rows - I declared the column holding the binary data as a BLOB (not > that it makes a ton of difference for SQLite). > > This worked very well (using perl

Re: [sqlite] Monitor Queries

2007-05-23 Thread Joe Wilson
> I've a "black-box" (Linux) program - so no source available - using a > sqlite database. Is there any way I can monitor/log the queries made to > the database? If it's dynamically linked, just replace libsqlite3.so with your own. If it is statically linked and has -g symbols, use gdb. If it's

Re: [sqlite] Monitor Queries

2007-05-23 Thread Joe Wilson
--- Lloyd <[EMAIL PROTECTED]> wrote: > On Wed, 2007-05-23 at 07:21 -0700, Joe Wilson wrote: > > > I've a "black-box" (Linux) program - so no source available - using > > a > > > sqlite database. Is there any way I can monitor/log the queries made

Re: [sqlite] Is .dump the definitive backup method for sqlite?

2007-05-23 Thread Joe Wilson
--- Nigel Metheringham <[EMAIL PROTECTED]> wrote: > I'll see if I can reproduce the result with standard INSERT statements Try this: sqlite3 orig.db vacuum -- might be necessary to preserve row order sqlite3 orig.db ".dump BrokenTable" | tee orig.sql | sqlite3 new.db sqlite3 new.db ".dump

RE: [sqlite] bizarre query problem

2007-05-23 Thread Joe Wilson
--- Brett Keating <[EMAIL PROTECTED]> wrote: > Msica independiente|text|19|0056_People Get Ready1_test1.wma > POP|text|3|0057_The Mighty Ship1_test1.wma > POP|text|3|0058_The Mighty Quinn1_test1.wma > > Anyway, it turns out the problem was caused by creating an index on the > genre field. If I

RE: [sqlite] bizarre query problem

2007-05-23 Thread Joe Wilson
--- Brett Keating <[EMAIL PROTECTED]> wrote: > Actually this wasn't the issue after all... Indices have nothing to do > with it. > > The genre was being inserted from two different sources. It is a UTF-16 > string, and in one case it was being inserted with a null terminator, > and in another

Re: [sqlite] Problem using loadable extensions

2007-05-24 Thread Joe Wilson
--- Alexander Smondyrev <[EMAIL PROTECTED]> wrote: > I am trying to use loadable extensions in Sqlite and I've run into the > following 2 problems: > > 1) I've downloaded src for 3.3.17 Sqlite and build it, but the '.load' > option does not seem to appear when I run the shell. I've used the

Re: [sqlite] How can I get my query to run as fast as SQLiteSpy?

2007-05-24 Thread Joe Wilson
On Windows, timing sending the results to a file: sqlite3 your.db "SELECT * FROM trend_data" > foo.txt On a 2.0 GHZ P4 I get 50,000 rows/second, which is not bad considering it's a 5 year old machine and sqlite3 was not compiled with much optimization. Any new machine should be twice as

Re: [sqlite] Embedded SQL in C

2007-05-27 Thread Joe Wilson
--- Leif Jensen <[EMAIL PROTECTED]> wrote: >In a larger project we are using PostgreSQL database and Embedded SQL > in C (using ECPG) in a server daemon. We would like to be able to have this > to work with > SQLite for a stand-alone application. The Embedded SQL in C standard is > as used

Re: [sqlite] Embedded SQL in C

2007-05-27 Thread Joe Wilson
--- Leif Jensen <[EMAIL PROTECTED]> wrote: > I thought about the "fake" library myself > even though our project is more like 20 - 30k lines, but I'm not sure > how bad it would be. May not be worth the hassle given the size of your project. Since you're using C, consider rewriting your code

Re: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-28 Thread Joe Wilson
> I am working at porting sqlite ( ver 3.3.8 ) on an embedded device with > extremely low main memory. > > I tried running select queries on the tables( with about 2k records each > having about 5 strings) and they do well within 20kB of runtime heap > usage. > > But, when I try new insertions,

Re: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-28 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote: > > I am working at porting sqlite ( ver 3.3.8 ) on an embedded device with > > extremely low main memory. > > > > I tried running select queries on the tables( with about 2k records each > > having about 5 strings) and

RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-29 Thread Joe Wilson
ndows, in my opinion. --- Kalyani Tummala <[EMAIL PROTECTED]> wrote: > My temp_store is SDRAM. Thanks for your suggestion of using COMMIT. I > have not used it. Any other pointers? > > Best Regards > Kalyani > > > -Original Message- > From: Joe Wilson [ma

RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-29 Thread Joe Wilson
I think I know what's going on. When you insert new rows in the presence of indexes then sqlite must touch a lot of pages in each trascation to satisfy the rebuilding of the index(es). These pages are built up in the transaction log which is stored in temp_store, which happens to be memory in

Re: [sqlite] Problem using loadable extensions

2007-05-29 Thread Joe Wilson
> I'd like to figure out why the example > with half function which was provided by sqlite team can't be loaded as a > shared library. Yeah, it's poorly documented. I'll just put this in the wiki: http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions=1180475067=1 How To Build a Loadable

RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-30 Thread Joe Wilson
It may not be possible to get peak heap usage down to 30K, but here's some random ideas: I imagine you've already tried defining SQLITE_OMIT_* for the features that you don't need. Verify that your embedded OS has a space-efficient malloc implementation. Try to find a realtime graphical heap

[sqlite] sqlite internal structs don't make use of C bitfields?

2007-05-30 Thread Joe Wilson
You could save a few bytes in some sqlite internal structs if you'd use C bitfields for boolean flags: For example: struct MemPage { u8 isInit; /* True if previously initialized. MUST BE FIRST! */ u8 idxShift; /* True if Cell indices have changed */ u8 nOverflow;

Re: [sqlite] sqlite internal structs don't make use of C bitfields?

2007-05-30 Thread Joe Wilson
struct MemPage2 { u8 nOverflow;/* Number of overflow cell bodies in aCell[] */ u8 childPtrSize; /* 0 if leaf==1. 4 if leaf==0 */ u8 hdrOffset;/* 100 for page 1. 0 otherwise */ u8 isInit:1; /* True if previously initialized. MUST BE FIRST! */ Okay, maybe not

Re: [sqlite] sqlite internal structs don't make use of C bitfields?

2007-05-30 Thread Joe Wilson
MemPage bitfield patch below. sizeof(MemPage) on Linux: original: 84 patched: 76 Patched "make test" runs without regressions on Linux and Windows. Timings for "make test" (elapsed): original: 1:20.74 patched: 1:20.22 Size of sqlite3.o when compiled from almalogmation with all

Re: [sqlite] sqlite internal structs don't make use of C bitfields?

2007-05-30 Thread Joe Wilson
--- Dennis Cote <[EMAIL PROTECTED]> wrote: > There are also some issues with regard to the ordering and layout > of bitifleds in cross platform applications. I suspect that is the > reason they aren't used. If an external interface changed, sure. But these internal structs change constantly

Re: [sqlite] sqlite internal structs don't make use of C bitfields?

2007-05-30 Thread Joe Wilson
--- Dennis Cote <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > > > If an external interface changed, sure. But these internal structs > > change constantly from (minor) release to release. > > > > The struct in question is used solely by btree.c, so the

Re: [sqlite] sqlite internal structs don't make use of C bitfields?

2007-05-30 Thread Joe Wilson
> > If the MemPage are malloced individually (instead of being put in arrays), > > then they are 16 > byte > > aligned on most platforms, making the allocated block effectively the same > > size (well, that > > depends on how many bytes are used by malloc before the user block in > > memory). >

Re: [sqlite] Changing Schema On The Fly

2007-05-31 Thread Joe Wilson
Be aware of a Windows OS bug that prevents correct conversion of epoch integers to local date/time due to the recent US DST change: http://www.sqlite.org/cvstrac/tktview?tn=2322 Assuming you've applied the Windows OS DST patch, epoch-converted times can be off by an hour for pre-2007 dates in

Re: [sqlite] Re: CAST

2007-05-31 Thread Joe Wilson
--- John Stanton <[EMAIL PROTECTED]> wrote: > Sqlite lets you put in anything as the declared type. "DEAD PARROT", > "MONGOOSE", "GODZILLA" or "DECIMAL(6,1)" are all acceptable declared > types. Sqlite makes the underlying type TEXT if it is not obviously > numeric. The default affinity type

Re: [sqlite] Re: Changing Schema On The Fly

2007-06-01 Thread Joe Wilson
--- Mitchell Vincent <[EMAIL PROTECTED]> wrote: > I guess this isn't possible after all? Get the SQLite ODBC driver source code and alter it to do whatever you like when the type "timestamp" column comes up. > On 5/31/07, Mitchell Vincent <[EMAIL PROTECTED]> wrote: > > I have a set of databases

Re: [sqlite] Sqlite 3 Crash on OSX

2007-06-03 Thread Joe Wilson
--- Dan Kennedy <[EMAIL PROTECTED]> wrote: > On Fri, 2007-06-01 at 10:51 +0100, Mark Gilbert wrote: > > Folks. > > > > My app just crashed in the field randomly after some time running fine. > > > > Thread 12 Crashed: > > 0 libsqlite3.0.dylib 0x9406e587 sqlite3pager_get + 390 > >

Re: [sqlite] baffled by dates

2007-06-04 Thread Joe Wilson
--- John Stanton <[EMAIL PROTECTED]> wrote: > Sqlite does have a date format, it is physically a 64 bit floating point > number. There are functions to transform in and out of that format to > present dates as required by the user. The Sqlite date format uses a > magib epoch which matches all

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > I'v read in change log that some stack allocted memory were moved to the > heap, but I think that > there is still to much allocated memory on the stack. > After creating a table with 2000 columns, jdbc driver created a query that > run out of stack. > Default

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
Such a statement would never be issued on a low memory device. This is an exceptional case involving a select with 2000 unions - I would not worry about it. --- [EMAIL PROTECTED] wrote: > This is very worrying since it means that the statement cannot be compiled on > a > low memory device. > I

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson napisa³(a): > > Please respond to the mailing list in the future. > > Sorry. Different client. I didn't notice the adress. > > > At least there's a known workaround, so no problem. > > Workaround is not a solution. Incr

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > My application's doesn't create any databases itself. It allows users to > store any data. And users need to be able to store any number of columns in > 1 table (the most I'v heard about is about 1, but I wouldn't be > surprised if they had more). Trust me,

Re: [sqlite] disk I/O error

2007-06-06 Thread Joe Wilson
> A Linux 2.6/x86_64 system reports a "disk I/O error" (SQLITE_IOERR) > while generating a specific report from a SQLite database (SQLite > 3.3.6). The database and temporary files are accessed through an NFS > mount. After running the program again with SQLite tracing enabled > (plus a bit more

Re: [sqlite] Blob handling in command line tool sqlite3

2007-06-09 Thread Joe Wilson
.dump > when using a blob column in the command line tool 'sqlite3' im getting > garbled output when selecting from a table that contains a blob column. > > Is there a way to get the blob column output in escaped format, like its > used in the insert statement?

Re: [sqlite] Blob handling in command line tool sqlite3

2007-06-09 Thread Joe Wilson
CREATE TABLE t(b blob); INSERT INTO "t" VALUES(X'ABCD'); select quote(b) from t; X'ABCD' > Joe Wilson wrote: > > .dump > > yes, but dump gives me all rows for the table and not those that are the > result of a query (which might have a WHERE clause). > > Is

Re: [sqlite] sqlite 3.2.8 segmentation fault

2007-06-10 Thread Joe Wilson
You're crashing in free(), which means your heap is corrupted. The cause of the corruption could be from anywhere - and not necessarily sqlite. It might be the victim of a previously corrupted heap. Try running your program through a memory checker like valgrind to see what it turns up. Also

Re: [sqlite] Blob handling in command line tool sqlite3

2007-06-10 Thread Joe Wilson
--- Guido Ostkamp <[EMAIL PROTECTED]> wrote: > On Sat, 9 Jun 2007, Joe Wilson wrote: > > CREATE TABLE t(b blob); > > INSERT INTO "t" VALUES(X'ABCD'); > > select quote(b) from t; > > X'ABCD' > > Thanks, Joe. I am just wondering why this 'quote' is n

Re: [sqlite] sqlite3 through PDO/PHP issues.

2007-06-10 Thread Joe Wilson
> $sql = "SELECT count(*) FROM feedback"; > $result = $handle->query($sql); > echo "rows = " . $result->rowCount() . "\n"; I've never used PHP, but just for kicks, to eliminate the database from the equation, try: $sql = "SELECT 123 AS abc;"; and see what happens.

Re: [sqlite] error in round-function?

2007-06-10 Thread Joe Wilson
--- Olaf Schmidt <[EMAIL PROTECTED]> wrote: > On what OS have you tested? > If on windows, was it a GCC-compile or a MS-VC-compile? Running the GCC cross-compiled sqlite3.exe from http://www.sqlite.org/sqlite-3_3_17.zip on Windows (well, wine on Linux): SQLite version 3.3.17 Enter ".help"

Re: [sqlite] error in round-function?

2007-06-10 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Going into this statement on both Linux and Windows, > the exact same values are in realvalue and in rounder: > >realvalue: 0xf000 0.94995559107901499373838 >rounder:0x3faa 0.0500030 >

RE: [sqlite] sqlite 3.2.8 segmentation fault

2007-06-11 Thread Joe Wilson
This is a question for your OS vendor. --- "Rachmel, Nir (Nir)" <[EMAIL PROTECTED]> wrote: > I have run into a problem - using the same environment variables as I > did in the old version ( I am upgrading from 3.2.8 to the newest version > of 3.3.17), I am unable to compile succesfully. > Here is

RE: [sqlite] Slow View Performance

2007-06-11 Thread Joe Wilson
> TabA.ID1 > TabA.ID2 > TabA.field1 > > TabB.ID1 > TabB.ID2 > TabB.field2 > > TabC.ID1 > TabC.field3 > > ViewBC: > SELECT * FROM TabB INNER JOIN TabC On TabB.ID1 = TabC.ID1 > > This is slow: > SELECT field1, field2, field3 from TabA LEFT OUTER JOIN ViewBC ON TabA.ID1 = > ViewBC.ID1 AND TabA.ID2

Re: [sqlite] Database replication question

2007-06-11 Thread Joe Wilson
Large bulk inserts with more than one index (implicit or explicit) is not SQLite's strong suit. If you search the mailing list archives you'll find a few suggestions: - "BEGIN EXCLUSIVE" (or is it "BEGIN IMMEDIATE"?) on the database file and then copy the file over - fastest way or -

RE: [sqlite] PRAGMA cache_size = 0

2007-06-12 Thread Joe Wilson
> I tried to set the cache size to 0 (after sqlite3_open0, and then query > for pragma cache_size which returns 2000 (default cache size). Why its > not returning 10 (according to Weiyang Wang)? It does report 0, even though internally it is using a value of 10. SQLite version 3.3.17 Enter

Re: [sqlite] Database replication question

2007-06-12 Thread Joe Wilson
> If the performance problem is with the seconday index, is there a way to > "pause" indexing before > a large bulk insert and then "resume" it later without rebuilding the entire > index (to avoid > doing: drop index + inserts + create index)? No

Re: [sqlite] sqlite3_create_function function name when called?

2007-06-12 Thread Joe Wilson
--- Omar Eljumaily <[EMAIL PROTECTED]> wrote: > Is it possible to get the name of the function that the callback was > called because of? If you specified a userData argument in sqlite3_create_function() you can retrieve it in the functon itself with void

Re: [sqlite] Is it a bug?

2007-06-13 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > I have a user-defined function named DECRYPT, which decrypts column data > encrypted by my other UDF named ENCRYPT. > > The UDF callback function (which does the decrypting) calls > sqlite3_result_blob > after decrypting the data. Sqlite does return the data

Re: [sqlite] Is it a bug?

2007-06-14 Thread Joe Wilson
If both field types were BLOB_TEXT, then that should be provided. Only > in cases > where there were multiple columns and the data types were different > would a NULL > be returned. > > This would certainly be an improvement for Sqlite, would it not? > > cheers > -brett

Re: [sqlite] Is it a bug?

2007-06-14 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > 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

Re: [sqlite] Is it a bug?

2007-06-14 Thread Joe Wilson
--- Scott Hess <[EMAIL PROTECTED]> wrote: > On 6/14/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > > You can't infer a function's return type from its arguments. > > Take the hypothetical function FOO(x). If I pass it a number, it will > > return the number s

[sqlite] SQLite 3.X Database File Format ?

2007-06-14 Thread Joe Wilson
Is there an SQLite 3.x equivalent document for this? SQLite 2.X Database File Format http://sqlite.org/fileformat.html If not, is this 2.x document worth reading as a background to the general structure of the sqlite 3.x file and page format? Or has it changed so much that it's not useful?

Re: [sqlite] Optimization of equality comparison when NULL involved

2007-06-17 Thread Joe Wilson
> select tableA.path, tableA.value from tableA,tableB where > tableA.path=tableB.path and (tableA.value=tableB.value or > (tableA.value IS NULL AND tableB.value IS NULL)); > > It's possible that won't use an index, either, due to the OR, in which > case you could try a union between a select with

Re: [sqlite] Version 3.4.0

2007-06-18 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > 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

Re: [sqlite] Optimization of equality comparison when NULL involved

2007-06-18 Thread Joe Wilson
--- Sean Cunningham <[EMAIL PROTECTED]> wrote: > I have very large datasets and have found that the built in union, > intersect, and except operations do not seem to use indices > (would be happy to be proven wrong here). As such, they > are not very speedy with large large data sets. A

Re: [sqlite] Cache invalidation after insert statements.

2007-06-19 Thread Joe Wilson
Does every single process (however insignificant) that reads or writes to that sqlite database file run on the same 16 processor machine? > 16 Processor machine > ~40Gb ram > EMC storage > Running a huge Oracle 10G database > Running a 3rd party application that generates HUGE IO. > Part of

Re: [sqlite] The problem with index

2007-06-20 Thread Joe Wilson
--- "Sergey M. Brytsko" wrote: > The problem is the index is NOT used for query: > SELECT BBB FROM XXX WHERE BBB <> 100; > > but in case of query > SELECT BBB FROM XXX WHERE BBB > 100; > all is ok ... > The indices are very important for me, how should I build these queries? Say you have the

  1   2   3   4   5   6   7   8   >