[sqlite] WAL option doesn't release handles (v3.7.13)

2012-09-26 Thread Andrea Guardascione
Hi all, I wrote a simple C++ program that spawns 10 threads, each thread - creates an SQLite handle (threads don't share connections) - opens a database (common to all the threads), or creates it (with "Write-Ahead Log" option) if open fails - creates a table on

[sqlite] Size of WAL file and cache

2012-09-26 Thread Sebastian Krysmanski
Hi, I was wondering what the size (in MB) of a WAL file and of a shared/private cache is in SQLite. I'm running SQLite on an Android smartphone so space (RAM/"HDD") is scarce. 1. I understand that the WAL file is stored on the disk. Provided auto-checkpointing, how big would the WAL file grow?

[sqlite] .mode tabs does not work

2012-09-26 Thread hpydktvjnksya kfoxwfswkhlhuk
.mode tabs does not work: sqlite3

[sqlite] .mode tabs does not work

2012-09-26 Thread hpydktvjnksya kfoxwfswkhlhuk
.mode tabs does not work: echo -ne "\"\t" >f && sqlite3 --version && sqlite3

[sqlite] Seemingly random Access Violation errors

2012-09-26 Thread Matthew Dumbleton
I'm currently trying to write an app for the compact framework (3.5) using an sqlite database in c#. The application is occasionally throwing up odd Access Violation errors, crashing the application. Getting precious little from the crash dumps produced but from experimentation it seems that

Re: [sqlite] How much disk space is required to checkpoint?

2012-09-26 Thread Simon Slavin
On 26 Sep 2012, at 5:42am, Dan Kennedy wrote: > So when SQLite requires a temporary > file, it normally creates and opens a file with a randomized name > in /tmp then calls unlink() on it immediately - before it starts > using the file. Goodness me. Okay, I wasn't aware

Re: [sqlite] .mode tabs does not work

2012-09-26 Thread Clemens Ladisch
somebody wrote: > .mode tabs does not work: > > sqlite3 < .mode tabs > .show > EOF > ... > separator: "\t" Obviously, it does work. > echo -ne "\"\t" >f && sqlite3 < create table t(a text, b text); > .mode tabs > .import f t ".mode" sets the *output* mode. Regards, Clemens

Re: [sqlite] How much disk space is required to checkpoint?

2012-09-26 Thread Clemens Ladisch
Simon Slavin wrote: > On 26 Sep 2012, at 5:42am, Dan Kennedy wrote: >> So when SQLite requires a temporary >> file, it normally creates and opens a file with a randomized name >> in /tmp then calls unlink() on it immediately - before it starts >> using the file. > > [...]

Re: [sqlite] How much disk space is required to checkpoint?

2012-09-26 Thread Pavel Ivanov
On Wed, Sep 26, 2012 at 5:55 AM, Simon Slavin wrote: > > On 26 Sep 2012, at 5:42am, Dan Kennedy wrote: > >> So when SQLite requires a temporary >> file, it normally creates and opens a file with a randomized name >> in /tmp then calls unlink() on it

Re: [sqlite] How much disk space is required to checkpoint?

2012-09-26 Thread Simon Slavin
On 26 Sep 2012, at 2:36pm, Clemens Ladisch wrote: > Simon Slavin wrote: >> On 26 Sep 2012, at 5:42am, Dan Kennedy wrote: >>> So when SQLite requires a temporary >>> file, it normally creates and opens a file with a randomized name >>> in /tmp then

Re: [sqlite] How much disk space is required to checkpoint?

2012-09-26 Thread Jay A. Kreibich
On Wed, Sep 26, 2012 at 01:55:33PM +0100, Simon Slavin scratched on the wall: > There are problems with doing this under some versions of Unix/Linux, > and especially variants like Android. This technique is almost as old as Unix itself. If some OS versions can't deal with it, they're

Re: [sqlite] How much disk space is required to checkpoint?

2012-09-26 Thread Simon Slavin
On 26 Sep 2012, at 3:07pm, Jay A. Kreibich wrote: > Because it is the standard, time-tested way of doing this kind of > thing on Unix-- for a lot of very good reasons. Okay. Simon. ___ sqlite-users mailing list

Re: [sqlite] Seemingly random Access Violation errors

2012-09-26 Thread Joe Mistachkin
Matthew Dumbleton wrote: > > at UnsafeNativeMethods.sqlite3_close_interop(IntPtr db) > at SQLiteBase.CloseConnection(SQLiteConnectionHandle db) > at SQLiteConnectionHandle.ReleaseHandle() > at CriticalHandle.Cleanup() > at CriticalHandle.Dispose(Boolean disposing) >

Re: [sqlite] Seemingly random Access Violation errors

2012-09-26 Thread Matthew Dumbleton
Yes. Each time either thread connects a new sqliteconnection instance is created. I use a mutex protected static method through which both threads do their database connections in order to ensure database is accessed by only one thread at a time. From: Joe

Re: [sqlite] Seemingly random Access Violation errors

2012-09-26 Thread Joe Mistachkin
Matthew Dumbleton wrote: > > at UnsafeNativeMethods.sqlite3_close_interop(IntPtr db) > at SQLiteBase.CloseConnection(SQLiteConnectionHandle db) > at SQLiteConnectionHandle.ReleaseHandle() > at CriticalHandle.Cleanup() > at CriticalHandle.Dispose(Boolean disposing) >

Re: [sqlite] Size of WAL file and cache

2012-09-26 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 26/09/12 01:15, Sebastian Krysmanski wrote: > 1. I understand that the WAL file is stored on the disk. During a transaction the old pages and the new pages will both be present at some point no matter what mode is used. Consequently you should

Re: [sqlite] Seemingly random Access Violation errors

2012-09-26 Thread Matthew Dumbleton
Sorry, should have highlighted this better in my initial message. Started out using 1.0.56.0 and changed to 1.0.82.0, however problem remains. From: Joe Mistachkin Sent: 26/09/2012 21:42 To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] Seemingly

Re: [sqlite] Seemingly random Access Violation errors

2012-09-26 Thread Joe Mistachkin
Matthew Dumbleton wrote: > > Sorry, should have highlighted this better in my initial message. Started > out using 1.0.56.0 and changed to 1.0.82.0, however problem remains. > I'm unable to reproduce the issue here using the latest version. Could you provide some sample C# code that