Re: [sqlite] segfault in sqliteSafetyOn
On Sun, 02 May 2004 18:45:13 -0500 Kurt Welgehausen <[EMAIL PROTECTED]> claimed: > As FWPH said in his original post, this really sounds like a > problem with an external library. Has anyone else compiled or > run SQLite on a system with a version-2.6 kernel? (This is > why Linux is so much fun {;-).) > Actually, after looking at the output of valgrind, i'm wondering if this is due to the id3-tag reading library playing fast and loose with my memory. Something is mucking up my memory, and I'm pretty certain it's not me... This is why open source can be so much fun...:) But at least it's not some fatal incompatibility with existing libraries. (fwph) -- Frederick Heckel [EMAIL PROTECTED] (The strange attachment is my digital signature; do not be alarmed) === I smell a wumpus. pgp0.pgp Description: PGP signature
Re: [sqlite] CONCAT in SQLite (was Re: [sqlite] correct syntax for CASE...)
> ... handicapped by not being able to use parens in a FROM clause. It's not that you can't use parens anywhere in a FROM clause; you just can't have the entire table-list enclosed in parens. You can still do something like select * from (t1 left join t2 on ...) join t3 on ... Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] segfault in sqliteSafetyOn
On Sun, 02 May 2004 18:59:35 -0400 "D. Richard Hipp" <[EMAIL PROTECTED]> claimed: > Frederick Heckel wrote: > > > > I just attempted to run a program which I had left alone for a > > couple weeks, and found that every sqlite query i try to run > > generates this in gdb: > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x40865d34 in sqliteSafetyOn () from /usr/lib/libsqlite.so.0 > > > > For a specific case, a statement that generates this is: > > > > SELECT ( id ) FROM song where ( filename > > =="/home/fwph/why-cooperation-with-rms-is-impossible.mp3" ) > > > > the relevant line of code(i'm using the compile/step method): > > sqlite_compile (theDb, buffer, , , ); > > > > After a quick glance at the code, it appears that a segfault > will result if the "theDb" variable is NULL or some other > value other than a valid sqlite* pointer. guh. nevermind. i should remember to run valgrind first, and then post to lists. there's some sort of magical memory error somewhere in another part of the code. i blame gtk. :) (fwph) -- Frederick Heckel [EMAIL PROTECTED] (The strange attachment is my digital signature; do not be alarmed) === Bennett's Laws of Horticulture: (1) Houses are for people to live in. (2) Gardens are for plants to live in. (3) There is no such thing as a houseplant. pgp0.pgp Description: PGP signature
Re: [sqlite] CONCAT in SQLite (was Re: [sqlite] correct syntax for CASE...)
On May 2, 2004, at 4:07 PM, Kurt Welgehausen wrote: FROM (contacts AS c LEFT JOIN ... This has come up several times on this list. This behavior is entirely consistent with the grammar for select statements given in lang.html. The (partial) syntax is "FROM table-list"; "FROM (table-list)" is not allowed. I believe this also agrees with the SQL92 std. Interesting. I find it difficult to imagine any good reason to not allow parens as they improve readability. Additionally, parens are the only way _I_ find it easy to mentally parse SQL92 type FROM JOIN type statements, each join becoming like a table and then joined to the next table. Unless I decide to start using Oracle type syntax by putting my join logic in my constraint and using the (+) method, I find myself fairly handicapped by not being able to use parens in a FROM clause. Oh well... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] segfault in sqliteSafetyOn
Hi, I just attempted to run a program which I had left alone for a couple weeks, and found that every sqlite query i try to run generates this in gdb: Program received signal SIGSEGV, Segmentation fault. 0x40865d34 in sqliteSafetyOn () from /usr/lib/libsqlite.so.0 For a specific case, a statement that generates this is: SELECT ( id ) FROM song where ( filename =="/home/fwph/why-cooperation-with-rms-is-impossible.mp3" ) the relevant line of code(i'm using the compile/step method): sqlite_compile (theDb, buffer, , , ); buffer contains the above string. theDb is a pointer to the database already successfully opened. the three remaining double pointers are set to NULL. The segfault occurs inside this call, according to gdb. -i'm running gentoo linux kernel version 2.6.1, sqlite version 2.8.13 . this is using optimization flags -O2 -march=athlon-mp -funroll-loops -fomit-frame-pointer -pipe : i don't know if any of these could be causing the trouble. -i swear this was working two weeks ago..:) but i'm pretty sure i was using 2.8.13 then, too. are there any libraries which may have been updated on my system since then that could cause this breakdown? i'm inclined to think this is something outside of sqlite, be it a problem with optimization flags or external libraries, i don't know... i'm just not sure where to start to try and debug this. -if the dbase schema in question would be useful to answering this question, i can post it. suffice to say, there is a table song with field filename. (fwph) -- Frederick Heckel [EMAIL PROTECTED] (The strange attachment is my digital signature; do not be alarmed) === Applause, n: The echo of a platitude from the mouth of a fool. -- Ambrose Bierce pgp0.pgp Description: PGP signature
Re: [sqlite] .describe instead of .schema
Puneet Kishor <[EMAIL PROTECTED]> writes: > does anyone else miss the lack of a .desccommand in this > otherwise wonderful program? I find the .schema to be cumbersome, and it is > particularly difficult to get a nice list of columns and columntypes for a > given table. Unless, of course, I am missing something obvious... Not obvious, but you do have an alternative. sqlite> pragma table_info ( table_name ); will get you nice easily parsed (by machine or mind) output. It might be just what you're looking for. Look at the online docs for more info on the various pragmas: http://www.sqlite.org/lang.html#pragma Derrell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] Fw: Query optimization bug
- Original Message - From: Ismail Kizir To: [EMAIL PROTECTED] Sent: Monday, May 03, 2004 12:14 AM Subject: Query optimization bug Dear Sir, My name is Ismail Kizir, from Turkey. First of all, i want to thank you for you great software. I am testing it to use on my 'newspaper archives' project. Today, i remarked a query optimization bug on sqlite. I think, you would know it. SELECT count (pubdate) AS c FROM articletbl WHERE sitekodu = 4 AND ( (pubdate='2004-05-01' AND title='publication title') or (addr='/page1' AND pubdate='2004-05-02') ) I know that is a mal-formed query, but anyway, i think the optimizer should handle it correctly. But for this form of query sqlite doesn't use indexes. pubdate is an indexed column, it is article's date of publication. When i change the query to : SELECT count (pubdate) AS c FROM articletbl WHERE sitekodu = 4 AND ( (pubdate>'2004-05-01' AND (title='publication title' OR addr='/page1') ) it optimizes correctly. I hope it may help you. Kind regards Ismail Kizir
Re: [sqlite] CONCAT in SQLite (was Re: [sqlite] correct syntax for CASE...)
>> FROM (contacts AS c LEFT JOIN ... This has come up several times on this list. This behavior is entirely consistent with the grammar for select statements given in lang.html. The (partial) syntax is "FROM table-list"; "FROM (table-list)" is not allowed. I believe this also agrees with the SQL92 std. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] CONCAT in SQLite (was Re: [sqlite] correct syntax for CASE...)
>> It is '||' in Oracle, and I believe PostgreSQL as well... "||" is the concatenation operator in std SQL, and has been at least since 1992. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] .describe instead of .schema
apologies for this flurry of emails from a usually quiet lurker... does anyone else miss the lack of a .desccommand in this otherwise wonderful program? I find the .schema to be cumbersome, and it is particularly difficult to get a nice list of columns and columntypes for a given table. Unless, of course, I am missing something obvious... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] command history
Is there a way to enable some kind of command history in the SQLite shell? You know, press the up arrow to get the previous command... I think it is called READLINE support, no? Its a pain in the derierre hitting the up arrow and getting all the ^]]A kind of junk on the screen, but bad habits die hard... Many thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]