Re: [sqlite] Couple of questions about WAL

2010-07-22 Thread Andy Gibbs
On Thursday, July 22, 2010 6:14 PM, Dan Kennedy wrote: > On the other hand, if the only client connected to a database > does not disconnect cleanly (i.e. it crashes, the system crashes, > or the client exits without calling sqlite3_close()), then it > leaves the *-wal file in place. In this case

Re: [sqlite] Problems with 'make test' on 3.7.0

2010-07-22 Thread Andy Gibbs
On Thursday, July 22, 2010 8:21 PM, Richard Hipp wrote: >> > The configure command I'm using is: >> > >> > ./configure >> > CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug >> --with-tcl=/usr/lib/tcl8.4 >> > >> >> Sorry, I should add, I'm running on Debian Linux Lenny, with gcc 4.4.4,

Re: [sqlite] Couple of questions about WAL

2010-07-22 Thread Dan Kennedy
> If I do a BEGIN, SELECT1 and at that point a writer does BEGIN > IMMEDIATE, SELECT3, UPDATE, COMMIT, and then I continue with SELECT2 > COMMIT, will SELECT1 and SELECT2 have a consistent view of the > database > unaffected by the UPDATE in the middle. In other words, is the > Readers > view

Re: [sqlite] Help with complex UPDATE question

2010-07-22 Thread Alan Chandler
On 22/07/10 23:38, peterwinson1 wrote: > > Hello, > > I have a some what complex question about UPDATE. I have the following > table > > table1 (KEY, COL1) > > 0, 1 > 1, 2 > 2, 3 > 3, 4 > > What I would like to do is to UPDATE COL1 by subtracting the COL1 value > where KEY = 0 from the COL1 value

Re: [sqlite] Help with complex UPDATE question

2010-07-22 Thread Eric Smith
peterwinson1 wrote: > Hello, > > I have a some what complex question about UPDATE. I have the following > table > > table1 (KEY, COL1) > > 0, 1 > 1, 2 > 2, 3 > 3, 4 > > What I would like to do is to UPDATE COL1 by subtracting the COL1 value > where KEY = 0 from the COL1 value of the current r

[sqlite] Help with complex UPDATE question

2010-07-22 Thread peterwinson1
Hello, I have a some what complex question about UPDATE. I have the following table table1 (KEY, COL1) 0, 1 1, 2 2, 3 3, 4 What I would like to do is to UPDATE COL1 by subtracting the COL1 value where KEY = 0 from the COL1 value of the current row so that the result would be. 0, 0 1, 1 2, 2

Re: [sqlite] Couple of questions about WAL

2010-07-22 Thread Alan Chandler
On 22/07/10 17:14, Dan Kennedy wrote: > > When in WAL mode, clients use file-locks to implement a kind of > robust (crash-proof) reference counting for each database file. > When a client disconnects, if it is the only client connected to > that database file, it automatically runs a checkpoint an

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Kees Nuyt
On Thu, 22 Jul 2010 10:44:50 -0500, "Black, Michael (IS)" wrote: >Wrongread the docs...if copy didn't do binary by default there would so >many screwed up computers in the world > > >http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/copy.mspx?mfr=true > >Us

Re: [sqlite] SQLite version 3.7.0

2010-07-22 Thread Eric Smith
Darren Duncan wrote: > I don't have time to investigate right now, but both failing tests seem > to be connected with concurrent access to a table by two forked processes > (the test script forks a child, which does concurrent access). > > At least in the second case, the DROP TABLE and CREA

Re: [sqlite] SQLite version 3.7.0

2010-07-22 Thread Darren Duncan
Dan Kennedy wrote: > Is there any way your tests could be deleting a database > file while there is still an open sqlite connection to it? > > With 3.7.0, if the underlying database file is unlinked > while you are connected to it, then you try to write to > the database, you get SQLITE_IOERR_FSTA

Re: [sqlite] Problems with 'make test' on 3.7.0

2010-07-22 Thread Richard Hipp
On Thu, Jul 22, 2010 at 12:39 PM, Andy Gibbs wrote: > On Thursday, July 22, 2010 6:36 PM, Andy Gibbs wrote: > > > The configure command I'm using is: > > > > ./configure > > CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug > --with-tcl=/usr/lib/tcl8.4 > > > > Sorry, I should add, I'm r

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Griggs, Donald
Regarding win/dos COPY command and /b option: Thanks for correcting me, Michael. I somehow thought that NUL being the target would introduce some sort of "text affinity" but it's good to know the truth instead. ___ sqlite-users mailing list sqlite-us

Re: [sqlite] memory only table

2010-07-22 Thread Igor Tandetnik
Sam Carleton wrote: > I am using SQLite inside of Apache. I am using the Apache connection pool > system, so as long as the server is running there is always one connection > to the database. I have one very high traffic table with lots of reads and > writes, it turns out that this info does *NO

Re: [sqlite] Problems with 'make test' on 3.7.0

2010-07-22 Thread Andy Gibbs
On Thursday, July 22, 2010 6:36 PM, Andy Gibbs wrote: > The configure command I'm using is: > > ./configure > CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug > --with-tcl=/usr/lib/tcl8.4 > Sorry, I should add, I'm running on Debian Linux Lenny, with gcc 4.4.4, because this is proba

[sqlite] Problems with 'make test' on 3.7.0

2010-07-22 Thread Andy Gibbs
Hi, Has anyone else had any problems building sqlite 3.7.0 out of the fossil repository? 'configure' and 'make' run fine, but 'make test' gives me: cc1: warnings being treated as errors src/test_demovfs.c: In function 'demoSync': src/test_demovfs.c:318: error: implicit declaration of function '

[sqlite] memory only table

2010-07-22 Thread Sam Carleton
I am using SQLite inside of Apache. I am using the Apache connection pool system, so as long as the server is running there is always one connection to the database. I have one very high traffic table with lots of reads and writes, it turns out that this info does *NOT* need to be resident beyond

Re: [sqlite] Couple of questions about WAL

2010-07-22 Thread Richard Hipp
On Thu, Jul 22, 2010 at 12:14 PM, Dan Kennedy wrote: > > So one thing to bear in mind when using WAL mode is always to > call sqlite3_close() on all database handles before process > exit. Otherwise you may leave a big *-wal file in the file-system > which will need to be traversed by the next cl

Re: [sqlite] Couple of questions about WAL

2010-07-22 Thread Dan Kennedy
On Jul 22, 2010, at 6:07 PM, Alan Chandler wrote: > I have been reading about WAL, and there are a few questions I would > like to ask. > > 1) I am slightly confused about readers building the WAL index. It > says > way down the page > > quote: > > Using an ordinary disk file to provide shared

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Black, Michael (IS)
Wrongread the docs...if copy didn't do binary by default there would so many screwed up computers in the world http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/copy.mspx?mfr=true Using /b /b directs the command interpreter to read the number of bytes sp

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Kees Nuyt
On Thu, 22 Jul 2010 08:56:31 -0400, "Griggs, Donald" wrote: > > >Regarding: >Also...try doing a "copy my.db nul:" to get it cached once before you use > it. > > >Am I right in thinking he may want to include the "/b" (binary) option so that >the copy doesn't stop at the first nul byte? >

[sqlite] Linking SQLite 3.7.0 with PHP 5.3.2 -- php undefined symbols sqlite3_column_table_name

2010-07-22 Thread Jeffrey Thompson
When I attempted to link PHP 5.3.2 with SQLite 3.7.0 I got an undefined symbol sqlite3_column_table_name. By adding -DSQLITE_ENABLE_COLUMN_METADATA to my SQLite CFLAGS in the configure, I was able to link the PHP 5.3.2 Apache Module: CFLAGS="-arch x86_64 -DSQLITE_ENABLE_COLUMN_METADATA" \ ./confi

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Griggs, Donald
Regarding: Also...try doing a "copy my.db nul:" to get it cached once before you use it. Am I right in thinking he may want to include the "/b" (binary) option so that the copy doesn't stop at the first nul byte? copy /b my.db nul ___

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Black, Michael (IS)
Also...try doing a "copy my.db nul:" to get it cached once before you use it. You're probably running into disk head seeking the first time (due to random placement of your data relative to your query) which will slow you down a lot. Michael D. Black Senior Scientist Advanced Analytics Directo

Re: [sqlite] SQLite version 3.7.0

2010-07-22 Thread Filip Navara
On Thu, Jul 22, 2010 at 1:31 PM, Dan Kennedy wrote: [snip] > You cannot delete a file while it is open on windows, so > this doesn't come up on win32. Sure you can, except: - The correct sharing rights have to be specified for this to be allowed (FILE_SHARE_DELETE). As far as I know SQLite opens

Re: [sqlite] SQLite version 3.7.0

2010-07-22 Thread Dan Kennedy
On Jul 22, 2010, at 1:08 PM, Darren Duncan wrote: > Roger Binns wrote: >> On 07/21/2010 08:01 PM, Darren Duncan wrote: >>> Simply substituting in 3.7.0 causes a few new test failures for me >>> with the Perl >>> binding, DBD::SQLite, citing "disk I/O error". >> >> I can't speak for the Perl bin

[sqlite] Couple of questions about WAL

2010-07-22 Thread Alan Chandler
I have been reading about WAL, and there are a few questions I would like to ask. 1) I am slightly confused about readers building the WAL index. It says way down the page quote: Using an ordinary disk file to provide shared memory has the disadvantage that it might actually do unnecessary d