[sqlite] sqlite3_exec and returned error

2015-01-05 Thread Valery Reznic
Hello. I am not sure if it should go here or to devel list, so please bear with me. I was about to use sqlite3_exe with not null errmsg parameter and became a bit confused. Documentation says: --- If an error occurs while evaluating the SQL statements passed into

Re: [sqlite] How often is xDisconnect called? (Was: Suggestion for syntax enhancement for virtual tables)

2015-01-05 Thread Dan Kennedy
On 01/06/2015 11:59 AM, Peter Aronson wrote: It's this comment that makes me worry that xDisconnect can be called at other times than detach or close: ** When an in-memory Table object is deleted (for example when the ** schema is being reloaded for some reason), the VTable objects are not **

[sqlite] How often is xDisconnect called? (Was: Suggestion for syntax enhancement for virtual tables)

2015-01-05 Thread Peter Aronson
It's this comment that makes me worry that xDisconnect can be called at other times than detach or close: ** When an in-memory Table object is deleted (for example when the ** schema is being reloaded for some reason), the VTable objects are not ** deleted and the sqlite3_vtab* handles are not

Re: [sqlite] Error: database disk image is malformed

2015-01-05 Thread Neo Anderson
> Are you using the same sqlite3 binary for both operations? > > If a database has a table definition that an older version of SQLite does not > understand, it will sometimes give this error. If you’re using a newer > version of SQLite to dump/load the files, there will be no error. > Yes, I am

Re: [sqlite] PHP: squelch warning and error messages

2015-01-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/05/2015 04:53 PM, Lev wrote: > I'm using the PHP bindings for SQLite3. How can I squelch error > and warning messages? I do error checking, but the failing call > emits the messages. > > Messages like: > > Warning: SQLite3::prepare(): Unable

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/05/2015 10:25 AM, Jim Wilcoxson wrote: > It's easy to do this in Python using iterdump(), Be aware that the pysqlite dump implementation is incomplete in many ways. Some issues: - - Doesn't dump in a transaction so will have irregularities if

Re: [sqlite] A new to-be User!

2015-01-05 Thread Saffa Kemokai
Thanks Stephen, Appreciate your response. Saves me lots of time doing the wrong thing expecting the correct result. Norwoh -- - Original Message - From: "Stephen Chrzanowski" To: "General Discussion of SQLite Database" Sent: Monday,

Re: [sqlite] A new to-be User!

2015-01-05 Thread Stephen Chrzanowski
Although SQLite can be used in a server type situation, it is more geared towards being an embeded database solution. A couple of links you should read over: - http://sqlite.org/whentouse.html - http://sqlite.org/howtocorrupt.html On Mon, Jan 5, 2015 at 8:04 PM, Saffa Kemokai

[sqlite] A new to-be User!

2015-01-05 Thread Saffa Kemokai
Hi Everyone, I am looking for a database to replace Mysql. I plan to use Roundcube webmail. I have Mysql running but listening to Roundcube user group, I hear somewhat conflicting statements about mysql. Mostly people are saying it makes the system very slow in Roundcube for whatever reason.

[sqlite] PHP: squelch warning and error messages

2015-01-05 Thread Lev
I'm using the PHP bindings for SQLite3. How can I squelch error and warning messages? I do error checking, but the failing call emits the messages. Messages like: Warning: SQLite3::prepare(): Unable to prepare statement: 1, no such table: Thanks, Levente

Re: [sqlite] Error: database disk image is malformed

2015-01-05 Thread Jay Kreibich
On Jan 4, 2015, at 3:31 AM, Neo Anderson wrote: > I have a customer database which appears corrupt. When I run sqlite3 mydb and > PRAGMA integrity_check I got (literally, no other lines): > > Error: database disk image is malformed > > However, I can .dump and .read

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Jay Kreibich
On Jan 5, 2015, at 5:03 PM, Eduardo Morras wrote: > On Mon, 5 Jan 2015 14:42:28 -0600 > Jay Kreibich wrote: > >> >> >> On Jan 5, 2015, at 12:25 PM, Jim Wilcoxson wrote: >> >>> Simon - instead of using vacuum, it's much faster to create

Re: [sqlite] Error: database disk image is malformed

2015-01-05 Thread Eduardo Morras
On Sun, 4 Jan 2015 17:31:14 +0800 Neo Anderson wrote: > I have a customer database which appears corrupt. When I run sqlite3 > mydb and PRAGMA integrity_check I got (literally, no other lines): > > Error: database disk image is malformed > > However, I can .dump and

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Eduardo Morras
On Mon, 5 Jan 2015 14:42:28 -0600 Jay Kreibich wrote: > > > On Jan 5, 2015, at 12:25 PM, Jim Wilcoxson wrote: > > > Simon - instead of using vacuum, it's much faster to create a new > > database from the old one, then rename it. It's easy to do this in > >

[sqlite] Error: database disk image is malformed

2015-01-05 Thread Neo Anderson
I have a customer database which appears corrupt. When I run sqlite3 mydb and PRAGMA integrity_check I got (literally, no other lines): Error: database disk image is malformed However, I can .dump and .read to create a new database. The new database works fine and the most surprising result is

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Jay Kreibich
On Jan 5, 2015, at 12:25 PM, Jim Wilcoxson wrote: > Simon - instead of using vacuum, it's much faster to create a new > database from the old one, then rename it. It's easy to do this in > Python using iterdump(), or you can connect to the new (empty) > database, do your

[sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Jim Wilcoxson
Simon - instead of using vacuum, it's much faster to create a new database from the old one, then rename it. It's easy to do this in Python using iterdump(), or you can connect to the new (empty) database, do your create table statements, attach the old database as olddb, then do: insert into

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Jay Kreibich
On Jan 5, 2015, at 8:43 AM, Nelson, Erik - 2 wrote: > RSmith wrote on Monday, January 05, 2015 7:43 AM >> >> >>> On 01/05/2015 06:22 PM, Simon Slavin wrote: I have a database file which is 120GB in size. It consists of two huge tables and an

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Nelson, Erik - 2
Simon Slavin wrote on Monday, January 05, 2015 10:40 AM > > On 5 Jan 2015, at 2:43pm, Nelson, Erik - 2 > wrote: > > > RSmith wrote on Monday, January 05, 2015 7:43 AM > > > >> I haven't done this, but I seem to remember there was a way to tell > >> SQLite where

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Simon Slavin
On 5 Jan 2015, at 2:43pm, Nelson, Erik - 2 wrote: > RSmith wrote on Monday, January 05, 2015 7:43 AM > >> I haven't done this, but I seem to remember there was a way to tell >> SQLite where to make temp files, or override the system default at any >> rate -

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Nelson, Erik - 2
RSmith wrote on Monday, January 05, 2015 7:43 AM > > On 2015/01/05 13:32, Dan Kennedy wrote: > > On 01/05/2015 06:22 PM, Simon Slavin wrote: > >> I have a database file which is 120GB in size. It consists of two > huge tables and an index. //... > > Probably running out of space wherever temp

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread RSmith
On 2015/01/05 13:32, Dan Kennedy wrote: On 01/05/2015 06:22 PM, Simon Slavin wrote: I have a database file which is 120GB in size. It consists of two huge tables and an index. //... Probably running out of space wherever temp files are created. I haven't done this, but I seem to remember

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Simon Slavin
On 5 Jan 2015, at 11:32am, Dan Kennedy wrote: > Probably running out of space wherever temp files are created. Oh, that makes a lot of sense. The free space on the boot volume for that system is only 37GB. Okay, I can move the file to another computer. Thanks for the

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Igor Korot
Hi, Simon, On Mon, Jan 5, 2015 at 6:32 AM, Dan Kennedy wrote: > On 01/05/2015 06:22 PM, Simon Slavin wrote: >> >> I have a database file which is 120GB in size. It consists of two huge >> tables and an index. >> Its journal_mode is DELETE. >> >> It is on a partition with

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Dan Kennedy
On 01/05/2015 06:22 PM, Simon Slavin wrote: I have a database file which is 120GB in size. It consists of two huge tables and an index. Its journal_mode is DELETE. It is on a partition with 803GB of free space. By my calculations I have 6.7 times the amount of free space as the database is

[sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Simon Slavin
I have a database file which is 120GB in size. It consists of two huge tables and an index. Its journal_mode is DELETE. It is on a partition with 803GB of free space. By my calculations I have 6.7 times the amount of free space as the database is taking up. I use the SQLite shell tool