[sqlite] mutex assert_fail in btreeInvokeBusyHandler occasionally in a periodic DB update in 3.5.7, It's ok in 3.6.22(-DSQLITE_THREADSAFE=1)

2011-03-30 Thread ChingChang Hsiao
Please neglect the previous 2 emails. Sorry for the inconvenience. Version is 3.5.7 journal mode = DELETE SELECT sqlite_source_id(); 2011-01-28 17:03:50 ed759d5a9edb3bba5f48f243df47be29e3fe8cd7 -DSQLITE_THREADSAFE=1 in Makefile static int btreeInvokeBusyHandler(void *pArg){ BtShared *pBt =

[sqlite] assert_fail in btreeInvokeBusyHandler occasionally in a perodic DB update in 3.5.7, It's ok in 3.6.22(-DSQLITE_THREADSAFE=1)

2011-03-30 Thread ChingChang Hsiao
Version is 3.5.7 journal mode = DELETE SELECT sqlite_source_id(); 2011-01-28 17:03:50 ed759d5a9edb3bba5f48f243df47be29e3fe8cd7 -DSQLITE_THREADSAFE=1 in Makefile static int btreeInvokeBusyHandler(void *pArg){ BtShared *pBt = (BtShared*)pArg; assert( pBt->db ); assert(

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread David Garfield
Nice. For general use, you may also need to include duplicates in "od". For the GNU coreutils and Solaris 10 implementations, this would be the -v or --output-duplicates option. --David Garfield Kees Nuyt writes: > On Wed, 30 Mar 2011 12:51:11 -0400, "Santin, Gloria" >

[sqlite] assert_fail in btreeInvokeBusyHandler occasionally in a perodic DB update in 3.5.7, It's ok in 3.6.22

2011-03-30 Thread ChingChang Hsiao
Version is 3.5.7 journal mode = DELETE SELECT sqlite_source_id(); 2011-01-28 17:03:50 ed759d5a9edb3bba5f48f243df47be29e3fe8cd7 static int btreeInvokeBusyHandler(void *pArg){ BtShared *pBt = (BtShared*)pArg; assert( pBt->db ); assert( sqlite3_mutex_held(pBt->db->mutex) ); return

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread Kees Nuyt
On Wed, 30 Mar 2011 12:51:11 -0400, "Santin, Gloria" wrote: >Sorry, my question was not clear enough... >I need to open a file and store the contents into the BLOB field. Some of the >files are images and some are document templates. >Can I do that using just SQL

[sqlite] Issue with random() being called more than it should be.

2011-03-30 Thread garfield
Running the following commands: --setup create temporary table t(a text); insert into t values ('one'); insert into t values ('two'); insert into t values ('three'); insert into t values ('four'); insert into t values ('five'); --test select * from (select a,

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread Santin, Gloria
Thanks for the incite. Gloria -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Wednesday, March 30, 2011 1:20 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Insert BLOB data from the

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread Simon Slavin
On 30 Mar 2011, at 5:51pm, Santin, Gloria wrote: > Sorry, my question was not clear enough... > I need to open a file and store the contents into the BLOB field. Some of > the files are images and some are document templates. > Can I do that using just SQL commands from a command line? You

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread Jay A. Kreibich
On Wed, Mar 30, 2011 at 12:51:11PM -0400, Santin, Gloria scratched on the wall: > I need to open a file and store the contents into the BLOB field. > Can I do that using just SQL commands from a command line? No. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread Santin, Gloria
Sorry, my question was not clear enough... I need to open a file and store the contents into the BLOB field. Some of the files are images and some are document templates. Can I do that using just SQL commands from a command line? Thanks, Gloria -Original Message- From:

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread Jay A. Kreibich
On Wed, Mar 30, 2011 at 12:35:42PM -0400, Santin, Gloria scratched on the wall: > To all, > Is there any way to insert into a BLOB field using the insert statement? BLOB literals are given as hex strings, with a proceeding 'X'. For example: X'deadbeef' is a 4-byte BLOB. You would

[sqlite] Insert BLOB data from the command line

2011-03-30 Thread Santin, Gloria
To all, I am creating a script file to populate my SQLite database. I need to insert several BLOB data types into the initial database. I cannot find how to do this using just sql commands. Is there any way to insert into a BLOB field using the insert statement? Thanks, Gloria

Re: [sqlite] What foolproof strategies for database file non-corruption are there, as regards app and OS crashes (not hardware) when in WAL mode?

2011-03-30 Thread Jay A. Kreibich
On Wed, Mar 30, 2011 at 02:53:22PM +0100, Simon Slavin scratched on the wall: > > On 30 Mar 2011, at 1:46pm, Mikael wrote: > > > If yes, we have the solution needed already now - app/OS crashes won't crash > > the database, and rsync backups will create working backups even if made > > during

Re: [sqlite] sqlite3_analyze doesn't run on OSX 10.6.7

2011-03-30 Thread Jay A. Kreibich
On Tue, Mar 29, 2011 at 07:01:31PM -0500, Roger Wehage scratched on the wall: > Mac OS X 10.6.7 MacBook Pro 2.4 GHz Intel Core 2 Duo > > /Users/roger/Desktop > roger-wehages-macbook-pro:Desktop roger$ ./sqlite3_analyzer > dyld: Library not loaded: /usr/local/lib/libtcl8.6.dylib > Referenced

Re: [sqlite] What foolproof strategies for database file non-corruption are there, as regards app and OS crashes (not hardware) when in WAL mode?

2011-03-30 Thread Nico Williams
On Wed, Mar 30, 2011 at 8:53 AM, Simon Slavin wrote: > On 30 Mar 2011, at 1:46pm, Mikael wrote: >> If yes, we have the solution needed already now - app/OS crashes won't crash >> the database, and rsync backups will create working backups even if made >> during checkpoints.

Re: [sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread Oliver Peters
writes: > > > If we import the same text file into a MS Access database using INSERT INTO MDE SELECT * FROM > > [Text;Database=C:\\folder].[filename.txt], it takes about a minute and half but because SQLite does > not support that, I have to > > use the insert into statement for

[sqlite] WAL checkpoints versus fsync.

2011-03-30 Thread Scott Hess
[From a thread about WAL checkpoints...] On Wed, Mar 30, 2011 at 6:28 AM, Richard Hipp wrote: > On Wed, Mar 30, 2011 at 8:46 AM, Mikael wrote: >> Therefore I now wish to check with you, is SQLite implemented to somehow >> make checkpoints not be able to

Re: [sqlite] What foolproof strategies for database file non-corruption are there, as regards app and OS crashes (not hardware) when in WAL mode?

2011-03-30 Thread Simon Slavin
On 30 Mar 2011, at 1:46pm, Mikael wrote: > If yes, we have the solution needed already now - app/OS crashes won't crash > the database, and rsync backups will create working backups even if made > during checkpoints. But killing the power (or pulling out the hard disk connector) while SQLite is

[sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread asheu
> If we import the same text file into a MS Access database using INSERT INTO > MDE SELECT * FROM > [Text;Database=C:\\folder].[filename.txt], it takes about a minute and half > but because SQLite does not support that, I have to > use the insert into statement for every record inside a

Re: [sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread Oliver Peters
writes: > > > Thank you for the responses. > If we import the same text file into a MS Access database using INSERT INTO MDE SELECT * FROM > [Text;Database=C:\\folder].[filename.txt], it takes about a minute and half but because SQLite does > not support that, I have to use the

Re: [sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread Igor Tandetnik
as...@comcast.net wrote: > If we import the same text file into a MS Access database using INSERT INTO > MDE SELECT * FROM > [Text;Database=C:\\folder].[filename.txt], it takes about a minute and half > but because SQLite does not support that, I have to > use the insert into statement for every

Re: [sqlite] What foolproof strategies for database file non-corruption are there, as regards app and OS crashes (not hardware) when in WAL mode?

2011-03-30 Thread Richard Hipp
On Wed, Mar 30, 2011 at 8:46 AM, Mikael wrote: > Hi, > > (We're looking into using SQLite for some databases that need to be > reachable all the time by the users, so they must be non-corrupt and > working > all the time. Non-corrupt both in the sense that opening doesn't

[sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread asheu
Thank you for the responses. If we import the same text file into a MS Access database using INSERT INTO MDE SELECT * FROM [Text;Database=C:\\folder].[filename.txt], it takes about a minute and half but because SQLite does not support that, I have to use the insert into statement for every

[sqlite] What foolproof strategies for database file non-corruption are there, as regards app and OS crashes (not hardware) when in WAL mode?

2011-03-30 Thread Mikael
Hi, (We're looking into using SQLite for some databases that need to be reachable all the time by the users, so they must be non-corrupt and working all the time. Non-corrupt both in the sense that opening doesn't fail without manual intervention by the administrator, and in the sense that any

Re: [sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread Igor Tandetnik
as...@comcast.net wrote: > I know you can insert into MS Access from a FixedLength text file using > schema.ini with this: > INSERT INTO MDE SELECT * FROM [Text;Database=C:\\folder].[filename.txt] > > Is this supported in SQLite. No. > I know you can use import command to import a csv to

Re: [sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread Oliver Peters
writes: > > I know you can insert into MS Access from a FixedLength text file using schema.ini with this: > INSERT INTO MDE SELECT * FROM [Text;Database=C:\\folder].[filename.txt] > > Is this supported in SQLite. I have tried many syntax and getting syntax error. I am not sure if

[sqlite] INSERT INTO SQLite from a FixedLength text file

2011-03-30 Thread asheu
I know you can insert into MS Access from a FixedLength text file using schema.ini with this: INSERT INTO MDE SELECT * FROM [Text;Database=C:\\folder].[filename.txt] Is this supported in SQLite. I have tried many syntax and getting syntax error. I am not sure if I have the syntax incorrect or

Re: [sqlite] sqlite3_analyze doesn't run on OSX 10.6.7

2011-03-30 Thread Simon Slavin
On 30 Mar 2011, at 1:01am, Roger Wehage wrote: > Mac OS X 10.6.7 MacBook Pro 2.4 GHz Intel Core 2 Duo Works fine for me under 10.6.7 on a machine of the same spec as above. -rwxr-xr-x 1 simon simon 889924 6 May 2009 sqlite3_analyzer Try downloading again from

[sqlite] sqlite3_analyze doesn't run on OSX 10.6.7

2011-03-30 Thread Roger Wehage
Mac OS X 10.6.7 MacBook Pro 2.4 GHz Intel Core 2 Duo /Users/roger/Desktop roger-wehages-macbook-pro:Desktop roger$ ./sqlite3_analyzer dyld: Library not loaded: /usr/local/lib/libtcl8.6.dylib Referenced from: /Users/roger/Desktop/./sqlite3_analyzer Reason: image not found Trace/BPT trap

Re: [sqlite] Extremely large values error

2011-03-30 Thread Max Vlasov
On Tue, Mar 29, 2011 at 8:17 PM, Ralf Junker wrote: > On 29.03.2011 15:17, Max Vlasov wrote: > > > Thanks, this forced me to search more on the topic. I use Delphi and it > > appears that all Borland compilers has their own floating-point exception > > handling chain and it is

Re: [sqlite] Primary Key

2011-03-30 Thread Jonathan Allin
Or this: CREATE TABLE TwoPrimaryKeys (id INTEGER NOT NULL, name TEXT NOT NULL, address TEXT, PRIMARY KEY (id, name)) From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jonathan Allin Sent: 30 March 2011 08:41 To: 'General Discussion of SQLite

Re: [sqlite] Primary Key

2011-03-30 Thread Jonathan Allin
How about this: 'CREATE TABLE TwoPrimaryFields (primaryField1 TEXT NOT NULL, primaryField2 TEXT NOT NULL, someOtherField TEXT, PRIMARY KEY (primaryField1, primaryField2)) From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Andi Suhandi Sent: 30 March

[sqlite] Primary Key

2011-03-30 Thread Andi Suhandi
Does anyone know how to create table that has 2 primary key fields ? example: id (integer) as primary key, name (var char) primary key, address (varchar) I try to use SQLite Explorer to change the field properties, but always got fail Regards Andi