[sqlite] pthreadMutex

2009-12-08 Thread Luiz Gustavo P Tonello
Hello guy's! I'm a newbie in SQLite, and I need to compile an code C with SQlite. Well, when I try compile my code, SQLite return this error: /tmp/ccJJZKFA.o: In function `pthreadMutexAlloc': sqlite3.c:(.text+0x2f9c): undefined reference to `pthread_mutexattr_init' sqlite3.c:(.text+0x2faf):

Re: [sqlite] question on sqlite

2009-12-08 Thread Igor Tandetnik
Patnaik, Anjela wrote: > I need to run the following query on a table. How would i formulate > this in SQLite as it appears that SQLite doesn't do PL/SQL? > > I can use the tcl SQLite API or do this via SQLiteSPY, but SQLitespy > doesn't understand the constructs. > >

[sqlite] question on sqlite

2009-12-08 Thread Patnaik, Anjela
Hello all, I need to run the following query on a table. How would i formulate this in SQLite as it appears that SQLite doesn't do PL/SQL? I can use the tcl SQLite API or do this via SQLiteSPY, but SQLitespy doesn't understand the constructs. Thanks DECLARE TYPE OpList IS TABLE OF

[sqlite] Commit failing due to DB locked.

2009-12-08 Thread John Clayton
Hi I've got two processes opening up two sqlite databases. Assuming the databases are called A and B respectively, then both processes do this: using A, BEGIN IMMEDIATE using B, BEGIN IMMEDIATE ... do some stuff possibly involving A ... using B, COMMIT

[sqlite] USING bug

2009-12-08 Thread Wiktor Adamski
SQLite version 3.6.21 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table t1(a int); sqlite> create table t2(a int); sqlite> create table t3(a int, b int); sqlite> insert into t1 values(1); sqlite> insert into t3 values(1, 1); sqlite> select * from t1

Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread Andreas Schwab
"D. Richard Hipp" writes: > For proof, could you please indicate where, exactly, we are violating C > aliasing rules? See the patch. You are storing a value of type void* in an object of type Mem*. This is a classical example of an obvious aliasing violation. > And what

Re: [sqlite] Where is CASE documented ?

2009-12-08 Thread Simon Slavin
On 8 Dec 2009, at 10:36pm, Pavel Ivanov wrote: > In brief, when you give optional expression then CASE works like > 'switch ... case ... case ... default' construction in C, when > optional expression is not given it works like series of 'if ... else > if ... else' constructions in C. Thanks

Re: [sqlite] Where is CASE documented ?

2009-12-08 Thread Jay A. Kreibich
On Tue, Dec 08, 2009 at 10:23:46PM +, Simon Slavin scratched on the wall: > My Google-fu appears to be weak. SQLite apparently supports a > CASE ... WHEN construction. Where on www.sqlite.org is the > meaning defined ? I can see CASE mentioned in diagrams on I'm not sure it is. I

Re: [sqlite] Where is CASE documented ?

2009-12-08 Thread Pavel Ivanov
Apparently document writer assumed that it's pretty obvious how CASE works because it works the same way in all DBMSes. :) You can read any documentation Google gives, e.g. this: http://msdn.microsoft.com/en-us/library/ms181765.aspx. In brief, when you give optional expression then CASE works

[sqlite] Where is CASE documented ?

2009-12-08 Thread Simon Slavin
My Google-fu appears to be weak. SQLite apparently supports a CASE ... WHEN construction. Where on www.sqlite.org is the meaning defined ? I can see CASE mentioned in diagrams on http://www.sqlite.org/lang_expr.html http://www.sqlite.org/syntaxdiagrams.html but I don't understand the use of

Re: [sqlite] NULL vs ''

2009-12-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ted Rolle, Jr. wrote: > When I .import a file into a table, || results in a value of '' for the > data item. > How can I get a NULL value stored? The SQLite shell cannot read your mind to determine if a zero length string should be a zero length

Re: [sqlite] Implementing Regular Expression Support...?

2009-12-08 Thread li...@mgreg.com
On Dec 8, 2009, at 12:24 PM, J. King wrote: > On Tue, 08 Dec 2009 12:11:13 -0500, li...@mgreg.com > wrote: > >> Hi All, >> >> I'm currently using SQLITE in a few production apps. I'm using various >> languages such as Ruby, PERL, RB, etc. I have need to use regular >>

Re: [sqlite] Implementing Regular Expression Support...?

2009-12-08 Thread J. King
On Tue, 08 Dec 2009 12:11:13 -0500, li...@mgreg.com wrote: > Hi All, > > I'm currently using SQLITE in a few production apps. I'm using various > languages such as Ruby, PERL, RB, etc. I have need to use regular > expressions in some of my queries, but I'm not sure how

[sqlite] Implementing Regular Expression Support...?

2009-12-08 Thread li...@mgreg.com
Hi All, I'm currently using SQLITE in a few production apps. I'm using various languages such as Ruby, PERL, RB, etc. I have need to use regular expressions in some of my queries, but I'm not sure how to implement "user defined functionality". Where are the hooks? Is there a particular

Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread Andreas Schwab
"D. Richard Hipp" writes: > On Dec 7, 2009, at 8:41 PM, Andreas Schwab wrote: > >> D. Richard Hipp writes: >> >>> As always, please let us know if you encounter any difficulties with >>> this or any other SQLite release. >> >> It's still crashing due to undefined behaviour. >> >>

Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread D. Richard Hipp
On Dec 8, 2009, at 9:51 AM, Andreas Schwab wrote: > "D. Richard Hipp" writes: > >> On Dec 7, 2009, at 8:41 PM, Andreas Schwab wrote: >> >>> D. Richard Hipp writes: >>> As always, please let us know if you encounter any difficulties with this or any other SQLite

[sqlite] NULL vs ''

2009-12-08 Thread Ted Rolle, Jr.
When I .import a file into a table, || results in a value of '' for the data item. How can I get a NULL value stored? This also happens when the item is at the end (EOL) of the row. Currently, I: UPDATE table SET value=NULL where value=''; Ted ---

Re: [sqlite] fsync/fdatasync problem on UBIFS

2009-12-08 Thread Ronny Dierckx
> >Using "PRAGMA journal_mode=truncate" made no difference, the journal >reappeared with file size > 0. > >But "PRAGMA journal_mode=persist" fixes the problem, the database is no >longer rolled back after a power cut. > FYI, The problem turned out to be a bug in the UBIFS backport we are using.

Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread D. Richard Hipp
On Dec 7, 2009, at 8:41 PM, Andreas Schwab wrote: > D. Richard Hipp writes: > >> As always, please let us know if you encounter any difficulties with >> this or any other SQLite release. > > It's still crashing due to undefined behaviour. > > $ ./sqlite3 :memory: 'create table test(integer)' >

Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread Andreas Schwab
D. Richard Hipp writes: > As always, please let us know if you encounter any difficulties with > this or any other SQLite release. It's still crashing due to undefined behaviour. $ ./sqlite3 :memory: 'create table test(integer)' Segmentation fault Andreas. -- Andreas Schwab,

Re: [sqlite] missing dot command

2009-12-08 Thread Roger Binns
Oliver Peters wrote: > because of curiosity I checked the "Improvements to "dot-command" handling in > the Command Line Interface." (http://www.sqlite.org/releaselog/3_6_21.html) The dot command fixes were mostly in 3.6.20. You can see the list of fixed shell bugs at

Re: [sqlite] missing dot command

2009-12-08 Thread Oliver Peters
Hello, [...] > > Oliver Peters wrote: > > despite documentation there is no ".iotrace FILE" in 3.6.21 > > You have to compile the shell *and* the SQLite library with > - -DSQLITE_ENABLE_IOTRACE. It is off by default. I didn't compile it but simply took the Windows-Version from the site and

Re: [sqlite] SQLite bug report - large databases only - 'database or disk is full'

2009-12-08 Thread Filip Navara
On Mon, Dec 7, 2009 at 10:21 PM, wrote: > > SQLite bug report > > Summary: > -- > > error message: > >       Error: near line 2: database or disk is full > > It happens with plenty of disk space available and with 'unlimited' database > size. > It does not happen on

Re: [sqlite] missing dot command

2009-12-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oliver Peters wrote: > despite documentation there is no ".iotrace FILE" in 3.6.21 You have to compile the shell *and* the SQLite library with - -DSQLITE_ENABLE_IOTRACE. It is off by default. I doubt it would be of much help to you unless you are

[sqlite] [bug+patch] crash when commit transaction between file db and temp db

2009-12-08 Thread Makoto SAITO
I found the crash bug when using transaction between filedb and temp db. To reproduce bug, execute follow sequence. > sqlite3.exe db1; sqlite3 > ATTACH DATABASE "" AS tempdb; sqlite3 > BEGIN; sqlite3 > CREATE TABLE tbl1 (c0); sqlite3 > CREATE TABLE tempdb.tbl2 (d0); sqlite3 > END; version:

[sqlite] missing dot command

2009-12-08 Thread Oliver Peters
despite documentation there is no ".iotrace FILE" in 3.6.21 greetings oliver ___ Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.! http://produkte.web.de/go/02/ ___ sqlite-users mailing