Re: [sqlite] SQLite Web Site
On 6-Feb-2008, at 8:41 PM, Dan wrote: > is not valid HTML. It is valid XHTML of course. All browsers > just ignore the "/" character, but I can't think of any document > where this is defined. Does anybody know? W3C's validator said this: The sequence can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HMTL 4.01 Strict, the '/' terminates the tag '). However, since many browsers don't interpret it this way, even in the presence of an HMTL 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Version 3.2.2
Literals in SQL use single quotes. Walt wrote: > I have a table 'listings' with fields 'listnum', 'price' and 'buyer' etc. > > executing the following sql > > UPDATE listings SET buyer = "Price" WHERE listnum = 12345 > > results in the 'buyer' field being set to the contents of the 'price' field > instead of setting the field 'buyer' to "Price". > > Need HELP > > Walt Mc Whirter > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
On Feb 7, 2008, at 6:12 AM, Scott Baker wrote: > Steven Fisher wrote: >> On 06-Feb-2008, at 12:33 PM, [EMAIL PROTECTED] wrote: >> >>> What do you mean "no longer found"? Do you mean that that >>> you cannot see anything at all, or that the new design is such >>> that it is not displayed correctly? >> >> Well, the page definitely doesn't validate: >> http://validator.w3.org/check?uri=http%3A%2F%2Fsqlite.org >> >> I don't know if that's the issue or not, of course. :) > > I did a quicky patch for the homepage to make it compliant: > > http://www.perturb.org/tmp/sqlite_homepage.patch > > It at least validates with my firefox plugin. This is a bit off-topic, sorry... What exactly is that firefox plugin checking? As far as I know, this kind of thing: is not valid HTML. It is valid XHTML of course. All browsers just ignore the "/" character, but I can't think of any document where this is defined. Does anybody know? The validator also complained about this: Ok, fine, you can't nest inside of . But the spec defines well what happens in this case. The first tag is closed automatically by the . The resulting empty paragraph is discarded (*special* html rule for - empty paragraphs have no effect on document layout). The final is discarded because it doesn't match any opening tag. So in this case the incorrect HTML is equivalent to the HTML suggested by the validator. Fair enough I guess, both versions are unambiguous and the suggested version is better. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bug found in the new register-based VM
Maybe it'll be better that hot-fixes goes under the same version plus hot-fix number? For example at 3.5.5 was introduced new VM, so all fixes for this will goes in releases like 3.5.5.X? On Feb 7, 2008 12:57 AM, <[EMAIL PROTECTED]> wrote: > I had been saying in release announcements that no bugs have > been found in the new register-based virtual machine introduced > in SQLite version 3.5.5. That changed with ticket #2927. We > have now observed our first register-VM bug. > > http://www.sqlite.org/cvstrac/tktview?tn=2927 > > There will likely be a new release (version 3.5.7) within a few > days in order to fix the problem discovered by ticket #2927. > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Alexander Batyrshin aka bash bash = Biomechanica Artificial Sabotage Humanoid ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Version 3.2.2
UPDATE listings SET buyer = 'Price' WHERE listnum = 12345 Double quotes are for column names. Walt wrote: > I have a table 'listings' with fields 'listnum', 'price' and 'buyer' etc. > > executing the following sql > > UPDATE listings SET buyer = "Price" WHERE listnum = 12345 > > results in the 'buyer' field being set to the contents of the 'price' field > instead of setting the field 'buyer' to "Price". > > Need HELP > > Walt Mc Whirter > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Version 3.2.2
I have a table 'listings' with fields 'listnum', 'price' and 'buyer' etc. executing the following sql UPDATE listings SET buyer = "Price" WHERE listnum = 12345 results in the 'buyer' field being set to the contents of the 'price' field instead of setting the field 'buyer' to "Price". Need HELP Walt Mc Whirter ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Bug found in the new register-based VM
I had been saying in release announcements that no bugs have been found in the new register-based virtual machine introduced in SQLite version 3.5.5. That changed with ticket #2927. We have now observed our first register-VM bug. http://www.sqlite.org/cvstrac/tktview?tn=2927 There will likely be a new release (version 3.5.7) within a few days in order to fix the problem discovered by ticket #2927. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
Steven Fisher wrote: > On 06-Feb-2008, at 12:33 PM, [EMAIL PROTECTED] wrote: > >> What do you mean "no longer found"? Do you mean that that >> you cannot see anything at all, or that the new design is such >> that it is not displayed correctly? > > Well, the page definitely doesn't validate: > http://validator.w3.org/check?uri=http%3A%2F%2Fsqlite.org > > I don't know if that's the issue or not, of course. :) I did a quicky patch for the homepage to make it compliant: http://www.perturb.org/tmp/sqlite_homepage.patch It at least validates with my firefox plugin. -- Scott Baker - Canby Telcom RHCE - System Administrator - 503.266.8253 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
On Wed, Feb 06, 2008 at 02:46:31PM -0800, L. S. wrote: > O-o-o-okay! That explains it. > I do vaguely remember that issue being discussed, some time ago. > Well... I'm in Cali', and I'm out of luck on this Palm/Blazer. I can load the SQLite web page in Opera Mini on my phone... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
O-o-o-okay! That explains it. I do vaguely remember that issue being discussed, some time ago. Well... I'm in Cali', and I'm out of luck on this Palm/Blazer. On 2/6/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "L. S." <[EMAIL PROTECTED]> wrote: > > The page never loads. I get the message, "The page download could not > > be completed. Please try again later." > > > > Here is the User-Agent header string: > > Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D052; > > Blazer/4.5) 16;320x320 > > > > The webserver on www.sqlite.org specifically excludes clients > claiming to be "Windows 98". We were getting a lot of abuse > coming out of China - people would download thousands of copies > of tarballs and use up gigabytes of bandwidth. Since excluding > Windows98 clients, we have not had any of the abuse problems. > We were not able to detect any change in the number of daily > visitors when we implemented the no-win98 policy, from > which we concluded that most people had upgraded to at least > win2k by the we instituted the change. > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
"L. S." <[EMAIL PROTECTED]> wrote: > The page never loads. I get the message, "The page download could not > be completed. Please try again later." > > Here is the User-Agent header string: > Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D052; > Blazer/4.5) 16;320x320 > The webserver on www.sqlite.org specifically excludes clients claiming to be "Windows 98". We were getting a lot of abuse coming out of China - people would download thousands of copies of tarballs and use up gigabytes of bandwidth. Since excluding Windows98 clients, we have not had any of the abuse problems. We were not able to detect any change in the number of daily visitors when we implemented the no-win98 policy, from which we concluded that most people had upgraded to at least win2k by the we instituted the change. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] error building amalgamation from 3.5.6 source tree
I have a few patches that I apply to SQLite and need to rebuild the amalgamation, but I get an error saying it can't find tsrc/fts3.h I verified on an un-patched 3.5.6 release that the same error occurs, both on Linux and MacOSX 10.5.1. Am I missing a step somewhere? If I remove all the fts3 references from mksqlite3c.tcl, it appears to build, but the generated sqlite3.c is missing the fts3 files, though it appears to compile and work without them... Here's how I reproduce the error: $ wget http://www.sqlite.org/sqlite-3.5.6.tar.gz $ tar -zxvpf sqlite-3.5.6.tar.gz $ cd sqlite-3.5.6 $ ./configure --enable-threadsafe $ make sqlite3.c gcc -g -O2 -o lemon ./tool/lemon.c cp ./tool/lempar.c . cp ./src/parse.y . ./lemon parse.y mv parse.h parse.h.temp gawk -f ./addopcodes.awk parse.h.temp >parse.h cat parse.h ./src/vdbe.c | gawk -f ./mkopcodeh.awk >opcodes.h sort -n -b -k 3 opcodes.h | gawk -f ./mkopcodec.awk >opcodes.c gcc -g -O2 -o mkkeywordhash ./tool/mkkeywordhash.c ./mkkeywordhash >keywordhash.h sed -e s/--VERS--/3.5.6/ ./src/sqlite.h.in | \ sed -e s/--VERSION-NUMBER--/3005006/ >sqlite3.h rm -rf tsrc mkdir -p tsrc cp ./src/alter.c ./src/analyze.c ./src/attach.c ./src/auth.c ./src/btmutex.c ./src/btree.c ./src/btree.h ./src/build.c ./src/callback.c ./src/complete.c ./src/date.c ./src/delete.c ./src/expr.c ./src/fault.c ./src/func.c ./src/hash.c ./src/hash.h ./src/insert.c ./src/journal.c ./src/legacy.c ./src/loadext.c ./src/main.c ./src/malloc.c ./src/mem1.c ./src/mem2.c ./src/mem3.c ./src/mem4.c ./src/mutex.c ./src/mutex_os2.c ./src/mutex_unix.c ./src/mutex_w32.c ./src/os.c ./src/os_unix.c ./src/os_win.c ./src/os_os2.c ./src/pager.c ./src/pager.h ./src/parse.y ./src/pragma.c ./src/prepare.c ./src/printf.c ./src/random.c ./src/select.c ./src/shell.c ./src/sqlite.h.in ./src/sqliteInt.h ./src/table.c ./src/tclsqlite.c ./src/tokenize.c ./src/trigger.c ./src/utf.c ./src/update.c ./src/util.c ./src/vacuum.c ./src/vdbe.c ./src/vdbe.h ./src/vdbeapi.c ./src/vdbeaux.c ./src/vdbeblob.c ./src/vdbefifo.c ./src/vdbemem.c ./src/vdbeInt.h ./src/vtab.c ./src/where.c ./ext/fts1/fts1.c ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.c ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_porter.c ./ext/fts1/fts1_tokenizer.h ./ext/fts1/fts1_tokenizer1.c sqlite3.h ./src/btree.h ./src/btreeInt.h ./src/hash.h ./src/sqliteLimit.h ./src/mutex.h opcodes.h ./src/os.h ./src/os_common.h ./src/sqlite3ext.h ./src/sqliteInt.h ./src/vdbe.h parse.h ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_tokenizer.h ./src/vdbeInt.h tsrc cp: warning: source file `./src/btree.h' specified more than once cp: warning: source file `./src/hash.h' specified more than once cp: warning: source file `./src/sqliteInt.h' specified more than once cp: warning: source file `./src/vdbe.h' specified more than once cp: warning: source file `./ext/fts1/fts1.h' specified more than once cp: warning: source file `./ext/fts1/fts1_hash.h' specified more than once cp: warning: source file `./ext/fts1/fts1_tokenizer.h' specified more than once cp: warning: source file `./src/vdbeInt.h' specified more than once rm tsrc/sqlite.h.in tsrc/parse.y cp parse.c opcodes.c keywordhash.h tsrc tclsh ./tool/mksqlite3c.tcl couldn't open "tsrc/fts3.h": no such file or directory while executing "open $filename r" (procedure "copy_file" line 5) invoked from within "copy_file tsrc/$hdr" (procedure "copy_file" line 21) invoked from within "copy_file tsrc/$file" ("foreach" body line 2) invoked from within "foreach file { sqliteInt.h date.c os.c fault.c mem1.c mem2.c mem3.c mutex.c mutex_os2.c mutex_unix.c mutex_w32.c ..." (file "./tool/mksqlite3c.tcl" line 201) make: *** [sqlite3.c] Error 1 Thanks. -Brad ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
On 06-Feb-2008, at 12:33 PM, [EMAIL PROTECTED] wrote: > What do you mean "no longer found"? Do you mean that that > you cannot see anything at all, or that the new design is such > that it is not displayed correctly? Well, the page definitely doesn't validate: http://validator.w3.org/check?uri=http%3A%2F%2Fsqlite.org I don't know if that's the issue or not, of course. :) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
The page never loads. I get the message, "The page download could not be completed. Please try again later." Here is the User-Agent header string: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D052; Blazer/4.5) 16;320x320 On 2/6/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "L. S." <[EMAIL PROTECTED]> wrote: > > I've been ignoring this issue for a while; the world won't end over this > but... > > There is some issue with the newly-designed SQLite web site that > > prevents access from my Palm Treo. It used to be accessible, with the > > old design. > > -- > > Often I surf, email, research, read, and download things using > > wireless access on my Treo web browser (and even store a copy of the > > SQLite source on my phone) because it's highly portable, has all day > > battery life, and I can Bluetooth-transfer stored files to my laptop. > > > > The site is no longer found on this platform. Why is this? > > What do you mean "no longer found"? Do you mean that that > you cannot see anything at all, or that the new design is such > that it is not displayed correctly? > > What does the User-Agent header string from your web browser > say on the Palm Treo? > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] when to analyze?
Thanks for that explanation. In my app tables are dropped and created and inserted with data continuously, so the recommended use won't quite apply, but I understand better now. I noticed sqlite_stat1 doesn't get updated if a table is dropped or renamed with ALTER TABLE, so I take it I will have to take care of this myself, particularly with a table rename. RBS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 06 February 2008 20:27 To: General Discussion of SQLite Database Subject: Re: [sqlite] when to analyze? "RB Smissaert" <[EMAIL PROTECTED]> wrote: > Suppose we have a table with some 10 million rows and this table was > analysed, so sqlite_stat1 has the stats of this table then is it worth it to > analyze again after adding say 1000 more rows? The indexing is still the > same, so no indexes are dropped or created. Also the data of the added rows > won't be dramatically different from the existing rows. > My guess it is not worth the time it will take and I could fine out by > experimenting, but maybe somebody has some thoughts about this and could > tell me. > Briefly: Your guess is correct For additional background into why ANALYZE exists and what it accomplishes for you, please see http://www.sqlite.org/cvstrac/wiki?p=QueryPlans SQLite rarely needs to do ANALYZE at all. You can usually get it to pick efficient query plans without having to ANALYZE. The recommended use of ANALYZE, if you use it at all, is to run it once during development on a dataset that is characteristic of the kinds of data your application will store. Retain the results of this ANALYZE as they are found in the sqlite_stat1 table. Then, when you deploy your application and create a new database, run ANALYZE once as soon as the schema is loaded but before any data is added. Such an ANALYZE will take almost no time because your database is empty. Then delete all of the information from the newly created sqlite_stat1 table and replace it with the data you saved from the ANALYZE you ran during development on your sample dataset. The result of this will be that SQLite will plan queries with an eye toward optimizing databases that are typical for your application. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Web Site
"L. S." <[EMAIL PROTECTED]> wrote: > I've been ignoring this issue for a while; the world won't end over this > but... > There is some issue with the newly-designed SQLite web site that > prevents access from my Palm Treo. It used to be accessible, with the > old design. > -- > Often I surf, email, research, read, and download things using > wireless access on my Treo web browser (and even store a copy of the > SQLite source on my phone) because it's highly portable, has all day > battery life, and I can Bluetooth-transfer stored files to my laptop. > > The site is no longer found on this platform. Why is this? What do you mean "no longer found"? Do you mean that that you cannot see anything at all, or that the new design is such that it is not displayed correctly? What does the User-Agent header string from your web browser say on the Palm Treo? -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] when to analyze?
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Suppose we have a table with some 10 million rows and this table was > analysed, so sqlite_stat1 has the stats of this table then is it worth it to > analyze again after adding say 1000 more rows? The indexing is still the > same, so no indexes are dropped or created. Also the data of the added rows > won't be dramatically different from the existing rows. > My guess it is not worth the time it will take and I could fine out by > experimenting, but maybe somebody has some thoughts about this and could > tell me. > Briefly: Your guess is correct For additional background into why ANALYZE exists and what it accomplishes for you, please see http://www.sqlite.org/cvstrac/wiki?p=QueryPlans SQLite rarely needs to do ANALYZE at all. You can usually get it to pick efficient query plans without having to ANALYZE. The recommended use of ANALYZE, if you use it at all, is to run it once during development on a dataset that is characteristic of the kinds of data your application will store. Retain the results of this ANALYZE as they are found in the sqlite_stat1 table. Then, when you deploy your application and create a new database, run ANALYZE once as soon as the schema is loaded but before any data is added. Such an ANALYZE will take almost no time because your database is empty. Then delete all of the information from the newly created sqlite_stat1 table and replace it with the data you saved from the ANALYZE you ran during development on your sample dataset. The result of this will be that SQLite will plan queries with an eye toward optimizing databases that are typical for your application. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite and signal handlers
Felix Radensky <[EMAIL PROTECTED]> wrote: > Hi, > > What is a recommended way of handling signals in daemon > processes using sqlite database ? Is calling sqlite3_interrupt() > in SIGTERM handler considered good enough ? > sqlite3_interrupt() was originally create for the specific purpose of handling SIGINT when you press Control-C in the CLI. So it is probably what you want. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] JOIN creating counter-intuitive results
P Kishor <[EMAIL PROTECTED]> wrote: > sqlite> select * from node limit 3; > node_id node_type node_name node_confidence > -- -- - --- > 1 ACT Mike Garrison 0.99932 > 2 ACT Pat Cox0.999193 > 3 ACT Steve Weise0.999149 > sqlite> select count(*) from node; > count(*) > -- > 17046 > sqlite> select * from edge limit 3; > edge_id from_node to_node edge_confidence edge_type > -- -- -- --- -- > 1 Barry Webster 0.998918 aa > 2 Barry Wright 0.998896 aa > 3 Barton Webster 0.998561 aa > sqlite> select count(*) from edge; > count(*) > -- > 19252 > sqlite> select e.edge_id, n1.node_id AS from_node_id > ...> from edge e join node n1 on > ...> e.from_node = n1.node_name limit 3; > > edge_id from_node_id > -- > 1 3840 > 2 3840 > 3 7230 > sqlite> select count(*) from edge e join node n1 on e.from_node = > n1.node_name; count(*) > -- > 21632 > sqlite> > > My intuition says that the row count from the last select should not > be more than 19,252, ... unless you have multiple node records with the same node_name. Which you do. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite Web Site
I've been ignoring this issue for a while; the world won't end over this but... There is some issue with the newly-designed SQLite web site that prevents access from my Palm Treo. It used to be accessible, with the old design. -- Often I surf, email, research, read, and download things using wireless access on my Treo web browser (and even store a copy of the SQLite source on my phone) because it's highly portable, has all day battery life, and I can Bluetooth-transfer stored files to my laptop. The site is no longer found on this platform. Why is this? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] JOIN creating counter-intuitive results
Hello, I am having trouble grasping the following issue intuitively -- sqlite> select * from node limit 3; node_id node_type node_name node_confidence -- -- - --- 1 ACT Mike Garrison 0.99932 2 ACT Pat Cox0.999193 3 ACT Steve Weise0.999149 sqlite> select count(*) from node; count(*) -- 17046 sqlite> select * from edge limit 3; edge_id from_node to_node edge_confidence edge_type -- -- -- --- -- 1 Barry Webster 0.998918 aa 2 Barry Wright 0.998896 aa 3 Barton Webster 0.998561 aa sqlite> select count(*) from edge; count(*) -- 19252 sqlite> select e.edge_id, n1.node_id AS from_node_id ...> from edge e join node n1 on ...> e.from_node = n1.node_name limit 3; edge_id from_node_id -- 1 3840 2 3840 3 7230 sqlite> select count(*) from edge e join node n1 on e.from_node = n1.node_name; count(*) -- 21632 sqlite> My intuition says that the row count from the last select should not be more than 19,252, the count of the left table (edge) in the join, and, in fact, can be less as not all e.from_node may find a match in n1.node_name. Instead, I am getting 21,632. In fact, when I create another join using e.to_node, I get even more records as below, and I am just not able to grasp why this is happening. sqlite> select count(*) from edge e join node n1 ...> on e.from_node = n1.node_name join ...> node n2 on e.to_node = n2.node_name; count(*) -- 25277 sqlite> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite version 3.5.6
Hello Richard, I think http://www.sqlite.org/cvstrac/wiki?p=ToDo is due for an update. Kind regards Lodewijk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 6:06 PM To: sqlite-users@sqlite.org; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [sqlite] SQLite version 3.5.6 SQLite version 3.5.6 is now available on the website. http://www.sqlite.org/download.html There is very little change from version 3.5.5. The reason for this release is that there was a regression in the virtual table mechanism that prevented virtual tables from being used in LEFT OUTER JOINs. And there were some updates to the OS/2 driver. Also, I bungled the release of version 3.5.5 such that some users downloaded copies of 3.5.4 that were labeled 3.5.5. We have still not encountered any bugs in new register-based virtual machine. You might recall that this was a huge change moving from version 3.5.4 to 3.5.5 and there was some concern that the change my destablize the core. But such concern is now past. Version 3.5.6 is recommended for all users and is consider stable and ready for production release. As always, please report any problems to this mailing list, or directly to me. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] when to analyze?
Suppose we have a table with some 10 million rows and this table was analysed, so sqlite_stat1 has the stats of this table then is it worth it to analyze again after adding say 1000 more rows? The indexing is still the same, so no indexes are dropped or created. Also the data of the added rows won't be dramatically different from the existing rows. My guess it is not worth the time it will take and I could fine out by experimenting, but maybe somebody has some thoughts about this and could tell me. RBS ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] New SQLite mailing lists.
Two new SQLite mailing lists have been established: sqlite-announce sqlite-dev Additional information and links to pages where you can sign up can be found at http://www.sqlite.org/support.html -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to select Strict Affinity or No Affinity modes?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Scott Chapman wrote: > I take it that there's no way to work around this currently? You can leave out the type for each column when declaring the table schema and no affinity conversions will happen. Alternatively, if you require that a type be declared then you can make up your own scheme that doesn't include any of the strings that SQLite picks up, somewhat similar to how C++ compilers do it: http://en.wikipedia.org/wiki/Name_mangling Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHqek7mOOfHg372QQRAm5XAJ0T2F/dA3TNEejFyFncfKAZkPIgywCglrG2 t0sPG/jg50Kevkb2eZQKUfs= =GlXb -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite version 3.5.6
SQLite version 3.5.6 is now available on the website. http://www.sqlite.org/download.html There is very little change from version 3.5.5. The reason for this release is that there was a regression in the virtual table mechanism that prevented virtual tables from being used in LEFT OUTER JOINs. And there were some updates to the OS/2 driver. Also, I bungled the release of version 3.5.5 such that some users downloaded copies of 3.5.4 that were labeled 3.5.5. We have still not encountered any bugs in new register-based virtual machine. You might recall that this was a huge change moving from version 3.5.4 to 3.5.5 and there was some concern that the change my destablize the core. But such concern is now past. Version 3.5.6 is recommended for all users and is consider stable and ready for production release. As always, please report any problems to this mailing list, or directly to me. -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite and signal handlers
Hi, What is a recommended way of handling signals in daemon processes using sqlite database ? Is calling sqlite3_interrupt() in SIGTERM handler considered good enough ? Thanks. Felix. -- View this message in context: http://www.nabble.com/SQLite-and-signal-handlers-tp15306961p15306961.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to select Strict Affinity or No Affinity modes?
I take it that there's no way to work around this currently? Scott Scott Chapman wrote: > D. Richard Hipp wrote: > >> On Feb 2, 2008, at 7:57 PM, Scott Chapman wrote: >> >> >> >>> I've looked high and low and can't find a way to invoke the other 2 >>> affinity modes. Are they available? I'm on 3.5.4. >>> >>> >> The concept of "strict" affinity mode was briefly discussed years >> ago, but we never implemented it, having never seen any benefit >> for such a thing. Can you explain why you think strict affinity mode >> might be beneficial to you? If somebody can provide a good >> enough rational to justify strict affinity mode, we might just put it >> in. >> >> > I'm working on a Python adapter that goes on top of APSW. It will > enable you to use the column types NUMERIC, DATE, TIME, TIMESTAMP and > automatically convert these to and from Python's respective data types. > > The case I'm dealing with that is not working like I want is the case of > NUMERIC column type. In SQLite, this column type gets an affinity of > REAL. If I put in a value to the column as a string literal, say > '123.23', it's stored as a REAL even though I specified it as a string > in quotes. I want it to store it as a string. The only way I've found > to fix this is to use a column type of NUMERIC_TEXT. The presense of > "TEXT" in the column type changes the affinity to string. This is not > very elegant and I was looking for any other way to make this work > correctly. "No Affinity" would probably work, if I understand it > correctly. > > I want to avoid the use of REAL types in this case because they can lead > to rounding errors, which is the whole purpose of the NUMERIC type to > begin with, in my understanding. I also would like to be able to make > the column type just NUMERIC as that is compilant with the SQL standard. > > Strict Affinity and No Affinity are mentioned in the SQLite3 Datatypes > page. If there are no plans to implement these, please consider > removing them from the docs. > > Thanks! > Scott > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] p in sclp in parse.y
Hello Himanshu, I'll look into it today, and get back. Thanks Uma HG <[EMAIL PROTECTED]> wrote: Hello, Could you tell me what the 'p' in 'sclp' in 'parse.y' stands for? I am trying to make a modification to the grammar file. Also the rule for sclp uses selcollist and the rule for selcollist uses sclp in some kind of mutual recursion. Is this a lemon feature or normal with LALR grammars. Thank You, HG [snipped parse.y beginning] %type sclp {ExprList*} %destructor sclp {sqlite3ExprListDelete($$);} sclp(A) ::= selcollist(X) COMMA. {A = X;} sclp(A) ::= .{A = 0;} selcollist(A) ::= sclp(P) expr(X) as(Y). { A = sqlite3ExprListAppend(pParse,P,X,Y.n?&Y:0); } selcollist(A) ::= sclp(P) STAR. { Expr *p = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0); A = sqlite3ExprListAppend(pParse, P, p, 0); } selcollist(A) ::= sclp(P) nm(X) DOT STAR. { Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0); Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &X); Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0); A = sqlite3ExprListAppend(pParse,P, pDot, 0); } ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] p in sclp in parse.y
Hello, Could you tell me what the 'p' in 'sclp' in 'parse.y' stands for? I am trying to make a modification to the grammar file. Also the rule for sclp uses selcollist and the rule for selcollist uses sclp in some kind of mutual recursion. Is this a lemon feature or normal with LALR grammars. Thank You, HG [snipped parse.y beginning] %type sclp {ExprList*} %destructor sclp {sqlite3ExprListDelete($$);} sclp(A) ::= selcollist(X) COMMA. {A = X;} sclp(A) ::= .{A = 0;} selcollist(A) ::= sclp(P) expr(X) as(Y). { A = sqlite3ExprListAppend(pParse,P,X,Y.n?&Y:0); } selcollist(A) ::= sclp(P) STAR. { Expr *p = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0); A = sqlite3ExprListAppend(pParse, P, p, 0); } selcollist(A) ::= sclp(P) nm(X) DOT STAR. { Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0); Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &X); Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0); A = sqlite3ExprListAppend(pParse,P, pDot, 0); } ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users