Re: [sqlite] Test suite

2008-01-15 Thread Joe Wilson
Grab the source tree via tar.gz file or cvs and run: ./configure make test or make fulltest To run just a single test file: make testfixture# if not already built by make test ./testfixture test/select1.test --- Ken <[EMAIL PROTECTED]> wrote: > Sorry if this has been asked, but

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-15 Thread Joe Wilson
--- Ken <[EMAIL PROTECTED]> wrote: > Doing this in oracle results in an error: > > SQL> select max(addr_id), emp_id from z_address; > select max(addr_id), emp_id from z_address > * > ERROR at line 1: > ORA-00937: not a single-group group function As expected. > I think an

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-15 Thread Joe Wilson
> On 1/14/08, mark pirogovsky <[EMAIL PROTECTED]> wrote: > > Some relational (PostgreSQL for example) databases allow you to store > > arbitrary array as a field in on row. I was not aware of Postgres arrays or that it is part of the SQL:1999 standard:

RE: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-14 Thread Joe Wilson
ng. -- Darren Duncan" > > > >I'm not asserting that you have to agree with the rationale, but did you > >see and read the discussion that Joe Wilson pointed out to you? > > > >= > >This issue is de

Re: [sqlite] Aggregates in SELECT without GROUP BY

2008-01-14 Thread Joe Wilson
This issue is debated from time to time on the list: http://www.mail-archive.com/sqlite-users@sqlite.org/msg17769.html The only other database that I'm aware of that supports selecting non-aggregates that are not listed in GROUP BY is MySQL: -- valid in sqlite and mysql, invalid in postgres

Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Joe Wilson
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > Sorry for the confusion. No problem. For what it's worth, I am also curious as to the final form of the VM opcode transformation. The number of opcodes generated by the various SQL statements seems to be roughly the same as the old scheme. At

Re: [sqlite] Next Version of SQLite

2008-01-13 Thread Joe Wilson
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > There are people on this mailing list (ex: Joe Wilson) who appear > to read every line of every change that we make to SQLite, within > minutes of making them, and complain if we so much as misspell a > word in a c

Re: [sqlite] GROUP BY optimizer cost problem with index

2007-12-23 Thread Joe Wilson
> create table stuff(a,b,c,d); > insert into stuff values(1,2,3,4); > create temp view v1 as select random()%100, > random()%100, random()%1000, random()%1 > from stuff x, stuff y; > insert into stuff select * from v1; > insert into stuff select * from v1; > insert into

[sqlite] GROUP BY optimizer cost problem with index

2007-12-23 Thread Joe Wilson
There seems to be an issue with the sqlite cost heuristic with an INDEX present on GROUP BY with certain types of WHERE clauses. Given the database formed by running these statements: create table stuff(a,b,c,d); insert into stuff values(1,2,3,4); create temp view v1 as select

Re: [sqlite] Unresolved symbols when I try to import SQLite int oVxWroks

2007-12-23 Thread Joe Wilson
Did you link with libc and libdl (-lc -ldl)? Perhaps these functions are found in other libraries on that platform. --- Gal Guttman <[EMAIL PROTECTED]> wrote: > I'm trying to port the SQLite to VxWorks, and I'm getting the following > messages: > > __divdi3, _rtld_dlsym, __umoddi3, __udivdi3,

Re: [sqlite] PATCH: WHERE clause OR to UNION optimization

2007-12-22 Thread Joe Wilson
;op = TK_UNION; ++ p->op = TK_ALL; @@ -329 +334 @@ -+p->op = TK_UNION; ++p->op = TK_ALL; @@ -339 +344 @@ -+p->op = TK_UNION; ++p->op = TK_ALL; --- Joe Wilson <[EMAIL PROTECTED]> wrote: > The attached patch implements the WHERE clause &q

[sqlite] PATCH: WHERE clause OR to UNION optimization

2007-12-21 Thread Joe Wilson
The attached patch implements the WHERE clause "OR to UNION" optimization as described in this post: http://www.mail-archive.com/sqlite-users@sqlite.org/msg09004.html If the computed cost of the rewritten WHERE clause is lower than the original query when indexes are taken into account, then

RE: [sqlite] a few lemon questions

2007-12-20 Thread Joe Wilson
--- "Wilson, Ron" <[EMAIL PROTECTED]> wrote: > That being said, I've run into a huge roadblock. I'm using flex which > produces lex.yy.c which includes and . Which errno/unistd functions are actually used by the generated flex code? getc, ungetc? Maybe you can supply work-alike functions and

RE: [sqlite] a few lemon questions

2007-12-20 Thread Joe Wilson
--- "Wilson, Ron" <[EMAIL PROTECTED]> wrote: > 1. My non-terminal token destructors are not getting called. The > terminal destructors work fine, but none of my terminal tokens need > destruction. Two of my non-terminals definitely require destruction. I > have properly defined the %destructor

RE: [sqlite] a few lemon questions

2007-12-18 Thread Joe Wilson
--- "Wilson, Ron" <[EMAIL PROTECTED]> wrote: > I think the source of my confusion is the fact that parse.h does not > appear in any of the sqlite source tree. I found it now that I've run > lemon on parse.y. However, I still can't find definitions for COMMA, > SEMI, etc. They appear in the

Re: [sqlite] a few lemon questions

2007-12-18 Thread Joe Wilson
--- "Wilson, Ron" <[EMAIL PROTECTED]> wrote: > %type multiselect_op {int} > multiselect_op(A) ::= UNION(OP). {A = @OP;} > multiselect_op(A) ::= UNION ALL. {A = TK_ALL;} > multiselect_op(A) ::= EXCEPT|INTERSECT(OP). {A = @OP;} > > 1. What does the '@' symbol mean? At

Re: [sqlite] SQLite and Columnar Databases

2007-12-15 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > The problem is when inserting into large database that is > indexed, the values being indexed are randomly distributed. > So with each insert, SQLite has to seek to a new random > place in the file to insert the new index entry there. > It does not matter that pages

Re: [sqlite] SQLite and Columnar Databases

2007-12-15 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > The reason why I asked is that I haven't had much luck with sqlite3 > > performance for databases larger than the size of RAM on my machine > > regardless of PRAGMA settings. > > This is

RE: [sqlite] SQLite and Columnar Databases

2007-12-13 Thread Joe Wilson
've never tried, but I don't see much reason why I > couldn't. I was just trying to make the point that labeling SQLite as > "good ... for smaller databases" was not a slight. > >-T > > > -Original Message- > > From: Joe Wilson [mailto:[EMAIL PROTEC

RE: [sqlite] SQLite and Columnar Databases

2007-12-13 Thread Joe Wilson
--- Tom Briggs <[EMAIL PROTECTED]> wrote: >For clarity, my definition of small is about 200GB, so I'm not > selling SQLite short here... Are you able to get decent performance out of sqlite3 for a 200GB database? How much RAM do you have on such a machine?

Re: [sqlite] DeviceSQL

2007-12-12 Thread Joe Wilson
Be careful about speculative comments. For all anyone knows, said product could use SQLite internally with a couple of proprietary optimizations here and there that may make it faster in specific cases. The sqlite public domain license would allow that sort of thing.

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-12 Thread Joe Wilson
It appears that Postgres, DB2 and SQL Server CE have issues with certain types of alias expresssions in GROUP BY, while MySQL does not. Postgres will allow column aliases in GROUP BY - even aliases overriding table column names - as long as every table column component of that alias'

Re: [sqlite] .dump/.load not workin in 3.4.0 or later for "large" rows?

2007-12-11 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > I think those exceedingly rare programs that need a larger > SQL statement length limit can include their own copy of > sqlite3.c. I does not take up that much space, after all. It's easy enough to recompile with the new setting once you're aware of it. But

Re: [sqlite] .dump/.load not workin in 3.4.0 or later for "large" rows?

2007-12-11 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Yes, this does create problems for .dump/.load in the shell. > But, as has been pointed out, you can work around it using > a compile-time switch: > > gcc -DSQLITE_MAX_SQL_LENGTH=10 shell.c sqlite3.c -o sqlite3 > > I should probably modify the makefile

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-11 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > The current name resolution rules for SQLite are that it > first tries to resolve names using just the tables in the > join. If that fails, then it looks at result column aliases. > I think that approach continues to work on WHERE. But I need > to reverse the

Re: [sqlite] .dump/.load not workin in 3.4.0 or later for "large" rows?

2007-12-11 Thread Joe Wilson
--- Jim Correia <[EMAIL PROTECTED]> wrote: > I notice that SQLite 3.4.0 and later impose hard limits on some > sizes. I'm running into a problem where a .dump/.load cycle fails on > a database with columns that have blobs which are about 2MB in size. > > Looking at the source for 3.5.3 (I

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-11 Thread Joe Wilson
--- Trevor Talbot <[EMAIL PROTECTED]> wrote: > On 12/10/07, Robert Wishlaw <[EMAIL PROTECTED]> wrote: > > > IBM DB2 9.5 > > > > select a AS "foo" from t1 union select b from t1 order by foo > > SQL0206N "FOO" is not valid in the context where it is used. > > SQLSTATE=42703 > > The problem

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-10 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Dennis Cote <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > > > > Can you please tell me what > > > other databases do with this: > > > > > >CREATE TABLE t1(a,b,c); > > >INSERT INTO t1 VALUES(1,2,4); > > >SELECT a+b AS c FROM t1 WHERE c==4;

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-08 Thread Joe Wilson
> >CREATE TABLE t1(a,b,c); > >INSERT INTO t1 VALUES(1,2,4); > >SELECT a+b AS c FROM t1 WHERE c=4; > > SQL Server returns a 3. > ORACLE 9 returns a 3. PostgreSQL 8.1.5 also returns a 3 Never

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-08 Thread Joe Wilson
--- Robert Wishlaw <[EMAIL PROTECTED]> wrote: > > >CREATE TABLE t1(a,b,c); > IBM DB2 9.5 > > INSERT INTO t1 VALUES(1,2,4); > SELECT a+b AS c FROM t1 WHERE c=4; > > returns > > C > >3 >3 >3 >

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-08 Thread Joe Wilson
>CREATE TABLE t1(a,b,c); >INSERT INTO t1 VALUES(1,2,4); >SELECT a+b AS c FROM t1 WHERE c==4; MySQL 5.0.45: create table t1(a INT, b INT, c INT); INSERT INTO t1 VALUES(1,2,4); SELECT a+b AS c FROM t1 WHERE c=4; +--+ | c| +--+ |3 | +--+ > In the WHERE clause,

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-08 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > > > So few lines of code are changed by the patch that one could easily > > add a new PRAGMA to have the old compound SELECT behavior to be the > > default. If a database is explicitl

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-08 Thread Joe Wilson
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > On Dec 7, 2007, at 11:47 PM, Joe Wilson wrote: > > > > I believe it makes compound query behavior more compatible with other > > popular databases. It is mostly backwards compatible with the previous > >

[sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-07 Thread Joe Wilson
The attached sqlite 3.5.3 patch addresses several different compound query column naming and resolving issues in ORDER BY and the SELECT expression list mentioned in this ticket: http://www.sqlite.org/cvstrac/tktview?tn=2822 (The exception being it does not support expressions in the ORDER

Re: [sqlite] unable to open a temporary database file for storing temporary tables

2007-12-05 Thread Joe Wilson
Regarding the DOS-like name, it may be the canonical name on Windows for FAT/VFAT file systems. Is that what you're using? I wonder if there's a hash collision in trying to get the file name down to DOS 8.3 file name format. Do you have many sqlite_* files in that directory? Since the file

Re: [sqlite] UNION and ORDER BY errors starting from sqlite 3.4.2

2007-12-05 Thread Joe Wilson
> Not in principle. But I think changes that break backwards > compatibility would be more trouble than they're worth for > something like this. In the absence of clearer guidance > from sql-92, it's probably more important to be compatible > with earlier sqlite versions than with mysql and

Re: [sqlite] UNION and ORDER BY errors starting from sqlite 3.4.2

2007-12-04 Thread Joe Wilson
--- Dan <[EMAIL PROTECTED]> wrote: > The "b" in the ORDER BY does not match "x1.b" because it is > not a simple identifier (according to matchOrderbyToColumn()). > It does not match either "" or " as ". > > After failing to find a match for "b" in the leftmost SELECT, > SQLite searches the next

Re: [sqlite] SQLite does not support multi-row inserts?

2007-12-04 Thread Joe Wilson
--- Sander Marechal <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > --- Sander Marechal <[EMAIL PROTECTED]> wrote: > >> I ran into a problem when using SQLite from PHP. It appears that SQLite3 > >> does not support multi-row inserts in the form: > >

Re: [sqlite] UNION and ORDER BY errors starting from sqlite 3.4.2

2007-12-04 Thread Joe Wilson
--- Dan <[EMAIL PROTECTED]> wrote: > i.e., if we have: > >CREATE TABLE x1(a, b, c); >CREATE TABLE x2(a, b, c); > > then the following pairs of statements are equivalent: ... > >SELECT x1.b, a FROM x1 UNION SELECT a, b FROM x2 ORDER BY b; >SELECT x1.b, a FROM x1 UNION SELECT a, b

Re: [sqlite] UNION and ORDER BY errors starting from sqlite 3.4.2

2007-12-03 Thread Joe Wilson
--- Marco Bambini <[EMAIL PROTECTED]> wrote: > Starting from version 3.4.2 I receive errors with queries like: > > SELECT a.field FROM a UNION ALL SELECT b.field FROM b ORDER BY a.field > or even > SELECT a.field FROM a UNION ALL SELECT a.field FROM a ORDER BY a.field > > error is: > ORDER BY

Re: [sqlite] SQLite does not support multi-row inserts?

2007-12-03 Thread Joe Wilson
--- Sander Marechal <[EMAIL PROTECTED]> wrote: > I ran into a problem when using SQLite from PHP. It appears that SQLite3 > does not support multi-row inserts in the form: > > INSERT INTO (col1, col2) VALUES (1, 2), (3, 4) > > Is that correct? That's correct. > Will if be implemented in the

Re: [sqlite] compiling for mingw

2007-12-02 Thread Joe Wilson
--- "A.J.Millan" <[EMAIL PROTECTED]> wrote: > Joe Wilso wrote: > >I would not bother with make install on MinGW - too much hassle - > >just copy out sqlite3.exe, libsqlite3.a and sqlite3.h manually > >to wherever you want to put it. > Joe:So, do is there a libsqlite3.a file?Where is it?Thanks--

Re: [sqlite] Mac OS X name mangling

2007-12-01 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > --- [EMAIL PROTECTED] wrote: > > > The comment probably should read: "Needed to enable pthread > > > recursive mutexes *on Linux*". > > > > Or more specifically, on

Re: [sqlite] Mac OS X name mangling

2007-12-01 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > The comment probably should read: "Needed to enable pthread > recursive mutexes *on Linux*". Or more specifically, on old versions of Linux/GNU LIBC. Have you seen any recent Linux distros that need this macro defined? If so, maybe you could define it only for

Re: [sqlite] Re: delete/update joins

2007-12-01 Thread Joe Wilson
--- Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > delete from table1 where rowid in ( > > select table1.rowid > >from table2 > > where table1.id = table2.id > > and table2.otherid = 1 > > ); > > Why not just >

Re: [sqlite] delete/update joins

2007-11-30 Thread Joe Wilson
This may be better: delete from table1 where rowid in ( select table1.rowid from table2 where table1.id = table2.id and table2.otherid = 1 ); --- Joe Wilson <[EMAIL PROTECTED]> wrote: > How about: > > delete from table1 where id in ( >select table1.id

Re: [sqlite] delete/update joins

2007-11-30 Thread Joe Wilson
How about: delete from table1 where id in ( select table1.id from table1, table2 where table1.id = table2.id and table2.otherid = 1 ); or this: delete from table1 where rowid in ( select table1.rowid from table1, table2 where table1.id = table2.id

Re: [sqlite] compiling for mingw

2007-11-30 Thread Joe Wilson
I would not bother with make install on MinGW - too much hassle - just copy out sqlite3.exe, libsqlite3.a and sqlite3.h manually to wherever you want to put it. Or just use the sqlite3.[ch] amalgamation and don't use libsqlite3.a at all. --- Bob Rossi <[EMAIL PROTECTED]> wrote: > However, when

Re: [sqlite] Lemon: Conflicts with repeated TERMINALS

2007-11-29 Thread Joe Wilson
--- Ralf Junker <[EMAIL PROTECTED]> wrote: > > paragraph ::= PARA text. > > I observed the new PARA terminal token (the clear separator!?). Unfortunately > the lexer does not > generate such a token. Paragraph repeats are also removed. It was just an HTML-like example. I just wanted to

Re: [sqlite] db crash when creating rows

2007-11-28 Thread Joe Wilson
I compiled your program with MinGW gcc 3.4.2 on Windows with sqlite-amalgamation-3_5_3.zip. gcc -I. ged.c sqlite3.c -o ged.exe It runs fine. If another sqlite3 process issues a query like: select * from test; while ged.exe is running, then ged.exe will exit with: Creating 10

Re: [sqlite] Lemon: Conflicts with repeated TERMINALS

2007-11-28 Thread Joe Wilson
--- Ralf Junker <[EMAIL PROTECTED]> wrote: > article ::= blocks. > > blocks ::= block. > blocks ::= blocks block. > > block ::= heading. > block ::= paragraph. > > heading ::= HEADING_START text HEADING_END. > heading ::= HEADING_START text. > heading ::= HEADING_START. > > paragraph ::= text

Re: [sqlite] DESC indexes not available after a VACUUM?

2007-11-28 Thread Joe Wilson
the new preset behavior of "PRAGMA legacy_file_format;"? --- Joe Wilson <[EMAIL PROTECTED]> wrote: > When I compare the database bytes before and after the 2nd > process VACUUM these bytes differ: > > zero-basedvalue value > byte offset befor

Re: [sqlite] DESC indexes not available after a VACUUM?

2007-11-27 Thread Joe Wilson
File change counter? 432 5 Schema cookie? 474 1 meta[1], file format? Doesn't byte offset 47 correspond to meta[1], the file format of the schema layer? --- Joe Wilson <[EMAIL PROTECTED]> wrote: > Regarding http://www.s

[sqlite] DESC indexes not available after a VACUUM?

2007-11-27 Thread Joe Wilson
Regarding http://www.sqlite.org/cvstrac/tktview?tn=2804 ... I'm confused by the explanation. Ignoring the PRAGMA for the moment, I was surprised that DESC indexes were not available after a reconnect and VACUUM, as shown in the example: $ rm -f foo.db $ ./sqlite3-3.5.3.bin foo.db SQLite version

Re: [sqlite] Re: Distinguishing empty-result SELECT from INSERT, UPDATE, DELETE, etc.

2007-11-27 Thread Joe Wilson
See also sqlite3_sql() if sqlite3_prepare_v2() or sqlite3_prepare16_v2() was used. http://www.sqlite.org/cvstrac/chngview?cn=4543 --- Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Evans, Mark (Tandem) <[EMAIL PROTECTED]> wrote: > > Would I be the first person to wish there were a way for, say, a

Re: [sqlite] Issue with index (maybe asc/desc problem)

2007-11-27 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > DESC indices requires a backwards-compatible file format > changes. Older versions of SQLite (prior to 3.3.0) cannot > read or write databases that make use of DESC indicdes. > To preserve compatibility, SQLite generates databases in > the old format by default.

Re: [sqlite] Version 3.5.3

2007-11-27 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > SQLite version 3.5.3 is now up on the website: > As always, please report any problems. http://www.sqlite.org/releaselog/3_5_3.html * DISTINCT can now make use of an INDEX in some cases.

RE: [sqlite] sqlite3Explorer

2007-11-25 Thread Joe Wilson
--- Cariotoglou Mike <[EMAIL PROTECTED]> wrote: > I wish I could "make it for Unix", but it uses a lot of windows-specific > things, plus it is done > in Delphi, and since > Kylix is practically dead, wlll... I didn't realize it was written in Delphi. Yes, that would be a difficult port to

Re: [sqlite] sqlite3Explorer

2007-11-24 Thread Joe Wilson
> the address follows, obfuscated for the usual reasons. to e-mail me, remove > any > numeric digits and punctuation from the address that follows, and do the > obvious substitutions. > hopefully spammers will not... > > m6_i_ke$car(ampersand)(dot)s#i#n#g#u#l#a#r(dot)gr Nevermind the spammers

RE: [sqlite] Performance tuning using PRAGMA, other methods

2007-11-20 Thread Joe Wilson
Why not try benchmarking the pragmas yourself and posting your findings to the list? http://www.sqlite.org/pragma.html --- Scott Krig <[EMAIL PROTECTED]> wrote: > Q1)) PRAGMA: Does anyone have experience and good results optimizing > sqlite performance using PRAGMA's? If so, which ones, how

Re: [sqlite] Memory Usage

2007-11-20 Thread Joe Wilson
ever execute a free your dynamic memory is essentially contiguous. > > Joe Wilson wrote: > > --- John Stanton <[EMAIL PROTECTED]> wrote: > > > >>Malloc is a concept implemented in various ways, some more successful > >>than others but all of them hidden fr

Re: [sqlite] how do I edit the wiki? or do I?

2007-11-19 Thread Joe Wilson
Step 1: [Edit] --- P Kishor <[EMAIL PROTECTED]> wrote: > I would like to put up step-by-step instructions that would make sense > to some one not so developer-like as I. How do I add stuff to the > wiki? or, how do I get a login for the wiki to do so?

Re: [sqlite] Re: building a custom DBD::SQLite

2007-11-19 Thread Joe Wilson
he following to my Makefile.in > > #TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1 > TCC += -DSQLITE_CORE=1 > TCC += -DSQLITE_ENABLE_FTS3=1 > > and then added all the fts3 .c and .h files in the appropriate places > as documented by Joe Wilson in another email. Then I did the following

Re: [sqlite] Lemon problem

2007-11-18 Thread Joe Wilson
It's most likely your bug. Just add some debug prints in your grammar and tokenizer to see what's going on. See also: ParseTrace() in http://www.hwaci.com/sw/lemon/lemon.html --- Téragone <[EMAIL PROTECTED]> wrote: > I have a problem with a rule of a small calculator which accept variables : >

Re: [sqlite] Bug on "!" unary prefix operator?

2007-11-17 Thread Joe Wilson
--- Ken <[EMAIL PROTECTED]> wrote: > SQLite documentation indicates that "!" is a unary prefix operator. Is this > a bug? Yeah, the docs seem to indicate that SQLite supports '!'. http://sqlite.org/lang_expr.html: Supported unary prefix operators are these: -+!~NOT If

[sqlite] SQL operator precedence

2007-11-17 Thread Joe Wilson
> I believe SQLite uses the same operator precedence as the SQL standard > requires. If I am wrong about that, please correct me and I will > change it. As I interpret the SQL92 standard (which I believe SQLite tries to follow), I think all comparison operators should have the same level of

Re: [sqlite] sqlite and lemon operator precedence problem/question

2007-11-17 Thread Joe Wilson
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > I was wrong. Turns out the bug was in the SQLite grammar > file parse.y. It was assigning the same precedence to the > ones-complement ~ operator and the NOT operator. But > ~ should have higher precedence, it seems. Fixed by > check-in

Re: [sqlite] sqlite and lemon operator precedence problem/question

2007-11-17 Thread Joe Wilson
> > sqlite> select ~1 - ~5; > > -8 > > sqlite> select (~1) - (~5); > > 4 > > > > That would be a bug in lemon... I guess adopting the same operator precedence as MySQL or MS SQL Server is out of the question? http://dev.mysql.com/doc/refman/5.0/en/operator-precedence.html BINARY,

[sqlite] sqlite and lemon operator precedence problem/question

2007-11-17 Thread Joe Wilson
I'm having difficulty with Lemon's operator precedence. Given SQLite's operator precedence table where it's presumably interpreted with lowest precedence tokens at the top to the highest precedence tokens at the bottom: %left OR. %left AND. %right NOT. %left IS MATCH LIKE_KW BETWEEN IN

Re: [sqlite] Re: Threads

2007-11-14 Thread Joe Wilson
--- John Stanton <[EMAIL PROTECTED]> wrote: > One of the ignored points about thread usage is just how expensive are > the synchronization mechanisms. It is a good idea to apply Occam's > Razor to your design and eliminate unnecessary features and have a > result which provides a better level

Re: [sqlite] Request for help with the SQLite Website

2007-11-14 Thread Joe Wilson
Threads are very much in the C tradition - minimalistic. If you code in C you must know what you're doing anyway. C is by no means a high level or safe language. But until an automatically parallelizing safe language with good performance becomes popular - this is what we got. You just have to

[sqlite] Re: Threads

2007-11-14 Thread Joe Wilson
--- Ken <[EMAIL PROTECTED]> wrote: > In general I'v found that Thread cancellation is very painful, > a simpler paradigm to utilize is the lock timeout with a Global > variable status check. Rather than check a global variable you could simply pass a null event to the queue which instructs the

Re: [sqlite] Request for help with the SQLite Website

2007-11-13 Thread Joe Wilson
--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > > On Nov 13, 2007, at 10:55 PM, Joe Wilson wrote: > > > http://home.pacbell.net/ouster/threads.pdf > > JO and I reach a similar conclusion but by different > reasoning, I think. I like

Re: [sqlite] Request for help with the SQLite Website

2007-11-13 Thread Joe Wilson
http://home.pacbell.net/ouster/threads.pdf --- Richard Klein <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > What? And encourage people to write multitheaded programs? > > Not likely... > > I've been meaning to ask ... When you say that multiple threads > are evil, do you mean "as

Re: [sqlite] Request for help with the SQLite Website

2007-11-13 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > You might mention the library is multi-thread safe in the Features > > section of http://www.sqlite.org/about.html > > What? And encourage people to write multitheaded programs? > Not likely

Re: [sqlite] Request for help with the SQLite Website

2007-11-13 Thread Joe Wilson
You might mention the library is multi-thread safe in the Features section of http://www.sqlite.org/about.html Do you have a page that describes all the SQLITE_OMIT_* ifdefs and compile options? Never

[sqlite] PATCH: allow DISTINCT queries to use an INDEX, if present

2007-11-11 Thread Joe Wilson
Attached patch allows DISTINCT queries to take advantage of an appropriate INDEX, if present. For example, given: CREATE TABLE foo(a, b); CREATE INDEX foo_b on foo(b); explain query plan select distinct b from foo; sqlite 3.5.2 returns: 0|0|TABLE foo and sqlite 3.5.2 + patch returns:

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- P Kishor <[EMAIL PROTECTED]> wrote: > On 11/9/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > > --- James Dennett <[EMAIL PROTECTED]> wrote: > > > > > Joe Wilson wrote: > > > > Also, non-technical people would be a better judge of which webs

RE: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- James Dennett <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > Also, non-technical people would be a better judge of which website > > design is appealing. > > Appealing *to* non-technical people? Why would a website on an embedded > database wish to appeal

RE: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- "Samuel R. Neff" <[EMAIL PROTECTED]> wrote: > > I hope this doesn't offend, but perhaps the best solution is to outsource > the website to someone or a company that specializes in websites and design > (with your stated simplicity goals in mind of course). We certainly > wouldn't want a

RE: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
o. There's a minor glitch on Firefox - increasing font size > causes the right side of menu bar to be whited out but display when > cursor hovers. Is this the bug Joe refers to below? > > Mark > > > -Original Message- > > From: Joe Wilson [mailto:[EMAIL PROTECTED

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- John Stanton <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > >>(3) http://sqlite.hwaci.com/v3/ CSS menus with square corners > > > > In Firefox 2.0.0.8, press "CTRL +" a couple of times to see the render > > problem. If I press &q

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > I put up 4 variations. Please, everyone, offer your opinions: > >(1) http://sqlite.hwaci.com/v1/ No CSS of any kind. >(2) http://sqlite.hwaci.com/v2/ CSS menus with rounded corners >(3) http://sqlite.hwaci.com/v3/ CSS menus with square

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > I don't think the extra bandwidth is an issue. Dan points out that > if you put the CSS in a separate file, then sometimes a browser > will render the page without CSS, then when the CSS arrives a > fraction of a second later, everything shifts. That's not the case

RE: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- James Dennett <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > No need to say it's stable or recommended - it's assumed. Otherwise it > > wouldn't appear on the home page. > > I disagree. 3.5.0 appeared, even though discussion was that it was > relati

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > There is a new look up on the demo site at > >http://sqlite.hwaci.com/ > > It looks good on Firefox and Safari, but IE6 renders The 'T' in 'SUPPORT' in the horizontal toolbar is cut off in my Linux Firefox 2.0.0.8 browser. I have a screen resolution of

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > The font change to > > > > font-family: "Verdana" "sans-serif"; > > > > makes a huge difference - much more professional looking. > > > &g

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- bash <[EMAIL PROTECTED]> wrote: > I am owner of web site with ~ 15k uniq visitors/day and I can say this > is not really true. > For example this is statistics from google analytics: > 1.1024x76842.51% > 2.1280x1024 27.73% > 3.1280x80010.43% > 4.1152x864

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
The font change to font-family: "Verdana" "sans-serif"; makes a huge difference - much more professional looking. --- [EMAIL PROTECTED] wrote: > A rough prototype of what a revised website might look like > can be seen at > > http://sqlite.hwaci.com/

Re: [sqlite] Re: Disk caching impacts performance.

2007-11-09 Thread Joe Wilson
> > One more thing, did raising the limit on the number of pages SQLITE > > can cache internally have any effect? > > I just tried (hadn't noticed that option before) to go from 2000 to 4000 > and 8000, without noticing any difference. I might try next week to > raise the page size to 50k and see

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > A rough prototype of what a revised website might look like > can be seen at > > http://sqlite.hwaci.com/ Instead of: Current Status As of 2007-11-05 20:49:21 UTC, version 3.5.2 of SQLite is stable. There are no known issues effecting database

Re: [sqlite] SQLite and Large Databases

2007-11-08 Thread Joe Wilson
--- PokerAce <[EMAIL PROTECTED]> wrote: > "Are you certain it's sqlite RAM, and not your application?" > > Yes, we are also testing PostgreSQL and MySQL and the application memory > with those stays < 20 mb. You're not using the sqlite3 API directly, are you? If that's the case, I think your

Re: [sqlite] Suggests for improving the SQLite website

2007-11-08 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > We are looking at renovating the design of the SQLite > website and would love to have suggestions from the > community. If you have any ideas on how to improve > the SQLite website, please constribute either to the > mailing list or directly to me. Prize giveaway

Re: [sqlite] SQLite and Large Databases

2007-11-08 Thread Joe Wilson
--- PokerAce <[EMAIL PROTECTED]> wrote: > I'm trying to see if SQLite is suitable for large databases ( > 1 gb, > millions of rows in each of several tables). Initially, the memory usage > was outrageous (~ 500 mb for a 1.3 gb db), but I got that down to < 30 mb by > setting the cache size to 0

Re: [sqlite] Disk caching impacts performance.

2007-11-08 Thread Joe Wilson
This disk cache effect is pretty well known on this list. Mozilla/Firefox also uses a similar technique for its sqlite database: http://developer.mozilla.org/en/docs/Storage:Performance#Priming_the_cache They go to the extra step of populating the sqlite page cache with some custom code:

Re: [sqlite] sqlite for 16 bits microcontroler x186

2007-11-08 Thread Joe Wilson
--- Felix <[EMAIL PROTECTED]> wrote: > I would use sqlite in an embedded DOS system ( intel 16 bits processor ) . > > Do you think that is possible or sqlite work only on 32/64 bits systems? I could be wrong, but I think sqlite expects that int and pointers are at least 32 bit. See if you can

Re: [sqlite] why select distinct does not use index?

2007-11-08 Thread Joe Wilson
--- "Maxim V. Shiyanovsky" <[EMAIL PROTECTED]> wrote: > Suppose I have simple table: > > CREATE TABLE [profile_data] ( > [profile_id] INTEGER, > [version] INTEGER); > > CREATE INDEX [by_id] ON [profile_data] ([id]); > > Why > > sqlite> explain query plan >...> select

Re: [sqlite] UTF-8 BLOB

2007-11-06 Thread Joe Wilson
It works in a Linux xterm. There's probably some UTF or codepage issue with the Windows console. Try using another command-line shell. --- Robert Wishlaw <[EMAIL PROTECTED]> wrote: > Using sqlite 3.5.2 on Windows XP, I have a textblob.csv file > > 192,C0,À0,À0 > 193,C1,Á0,Á0 > 254,FE,þ0,þ0 >

Re: [sqlite] Which built-in functions are mandatory?

2007-11-05 Thread Joe Wilson
--- Aladdin Lampé <[EMAIL PROTECTED]> wrote: > In other terms, which built-in functions can I safely remove (or rename) > without getting > internal errors? > I hope I can remove or rename all of them without compilation or execution > errors... What do you > think? It depends on your use. Some

Re: [sqlite] parse.y

2007-11-04 Thread Joe Wilson
> I have some sql statement (for example Select col1, col2... from > some_table left join some_table_2 on... > where ...) > and I want get information about this statement -- column's list, where > clause, table's list etc in some structure (parse tree). If you compile with

  1   2   3   4   5   6   7   8   >