RE: [sqlite] Do _ErrMsg strings have to be freed?

2005-02-07 Thread mswarm
> >Subject: RE: [sqlite] Do _ErrMsg strings have to be freed? > From: "steve" <[EMAIL PROTECTED]> > Date: Mon, 7 Feb 2005 19:31:23 -0800 > To: > >I also read the documentation that you quoted below. >If one must always free the char * using sqlite3_free, then

[sqlite] sqlite3 CLI and blobs

2005-02-07 Thread John Richard Moser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Does the sqlite3 command line interface program support BLOB data? I am considering that my choice of C may not have been the greatest idea in tackling the problem of writing a package manager. There is much already to do what I need to do, and I

Re: [sqlite] Do _ErrMsg strings have to be freed?

2005-02-07 Thread Dan Kennedy
> I read that. Just wanted to see if I was interpreting it correctly. There > appears to be some ambivalence in the _prepare method. > > Specifically, I'm concluding the "if it's not nil, free it" is OK. Never free a pointer returned from sqlite3_errmsg() or sqlite3_errmsg16(). If you call

Re: [sqlite] Do _ErrMsg strings have to be freed?

2005-02-07 Thread mswarm
>You'd have to read the docs of your Delphi wrapper, but if this were the >plain C interface, then, yes, you would need to free the memory. I've tested a dozen or so, and I'm hacking my own as well. The quality of the coding varies, naturally, from the ridiculous to the sublime. In some

[sqlite] How to best achieve the SQL-processing behavior I'm after?

2005-02-07 Thread mswarm
I'm experimenting with SQLite in a Delphi 4 environment, simultaneously learning Delphi, database practices, SQL, etc., etc. I've tried out perhaps a dozen Delphi wrappers of the SQLite DLL, and am hacking my own as well. Insane? You bet, but there it is. Getting my feet wet all the way to my

Re: [sqlite] Do _ErrMsg strings have to be freed?

2005-02-07 Thread mswarm
>>Does this >> >>var >> pMsg: PChar; >> >>.. >>pMsg := SQLite3_ErrMsg(aDB); >> >>necessitate this? >> >> if pMsg <> nil then SQLite3_Free(pMsg); > > >It depends. If you use sqlite3_exec, then yes, if you use the other >method (sqlite_prepare) then I would say no, depending on your

RE: [sqlite] Do _ErrMsg strings have to be freed?

2005-02-07 Thread steve
I also read the documentation that you quoted below. If one must always free the char * using sqlite3_free, then doesn't that mean that in the example provided at http://www.sqlite.org/quickstart.html 'zErrMsg' is actually a memory leak waiting to happen? And why isn't sqlite3_exec listed under

[sqlite] Cluster Indexes

2005-02-07 Thread Randall Fox
What type of select query would benefit from cluster indexes in SQLITE3 ? If you can, an example would be nice.. I found the following in the wiki, but it doesn't explain much.. Use cluster indexes Clustered indexes are indexes that comprise more than one column. These increase the speed of

Re: [sqlite] Do _ErrMsg strings have to be freed?

2005-02-07 Thread Randall Fox
On Mon, 7 Feb 2005 18:14:42 -0800, you wrote: >Does this > >var > pMsg: PChar; > >.. >pMsg := SQLite3_ErrMsg(aDB); > >necessitate this? > > if pMsg <> nil then SQLite3_Free(pMsg); It depends. If you use sqlite3_exec, then yes, if you use the other method (sqlite_prepare) then I would say

Re: [sqlite] Do _ErrMsg strings have to be freed?

2005-02-07 Thread Ulrik Petersen
Hi Nathan, [EMAIL PROTECTED] wrote: Does this var pMsg: PChar; .. pMsg := SQLite3_ErrMsg(aDB); necessitate this? if pMsg <> nil then SQLite3_Free(pMsg); You'd have to read the docs of your Delphi wrapper, but if this were the plain C interface, then, yes, you would need to free the

Re: [sqlite] Re: [Bulk] Re: [sqlite] How sqlite3_column_double works?

2005-02-07 Thread Dennis Cote
Marcelo Zamateo wrote: Excuse me, i'm not good programming in c. A double is 8 bytes width. How does a function return anything other than 4 bytes (in eax register) if not in a pointer? I'm using sqlite from assembler. It depends upon which CPU and calling convention you (and your compiler) are

Re: [sqlite] SQLITE crashs

2005-02-07 Thread [EMAIL PROTECTED]
Following is the Visual C++ Assertion Message: --- Microsoft Visual C++ RunTime Library Assertion failed! Program:... File:.\vdbe.c Line:1726 Expression: p1<0 || p->apCsr[p1]!=0 - Hope this can help. Thanks,

Re: [sqlite] speedtest result is obsolete

2005-02-07 Thread Chris Schirlinger
> I would be interested to know the results for very large data sets. > Indications on the list have been that performance suffers when the number > of records gets very big (> 1 million), possibly due to using an internal > sort. I must say, with a 2+ million row data set, we aren't getting

Re: [sqlite] sqlite thread safe builds

2005-02-07 Thread Jeff Thompson
Christian Smith wrote: You must disclaim copyright on any patches you do to be even considered for inclusion into SQLite. Check out: http://www.sqlite.org/copyright.html Thanks for the info Christian, sorry I didn't notice the requirement when submitting the original patch. :) Here's the

Re: [sqlite] SQLITE crashs

2005-02-07 Thread mqlin
Hello! Can anyone help here. It looks like a bug in the 3.1.1beta? i think from 3.1.1beta: --- SELECT t1.ID, (SELECT COUNT(*) FROM t2 WHERE t2.ID=t1.ID) FROM t1 In other words, in a subselect backreferencing to a field in its parent select. Now supported as of 3.1 --- The error

Re: [sqlite] sqlite & multithreading

2005-02-07 Thread bbum
On Feb 7, 2005, at 10:21 AM, Alex Chudnovsky wrote: Correct me if I am wrong but I was under the impression that having 2 separate connections to database (and while on subject I noticed that making connection via ADO.NET takes significant time measured in seconds rather than in milliseconds)

Re: [sqlite] speedtest result is obsolete

2005-02-07 Thread Christopher Petrilli
On Mon, 7 Feb 2005 10:09:58 -0800 (PST), Jay <[EMAIL PROTECTED]> wrote: > > I did a small test to see if performance was linear with time. > I wanted to make sure it was suitable for my application. > It seems with both indexed and unindexed tables it doesn't take > significantly longer to do the

Re: [sqlite] sqlite & multithreading

2005-02-07 Thread Alex Chudnovsky
[EMAIL PROTECTED] wrote: On Feb 7, 2005, at 9:50 AM, Yogesh Marwaha wrote: Both threads are using same sqlite connection. This is your problem. Each thread should use an isolated connection. Correct me if I am wrong but I was under the impression that having 2 separate connections to database

Re: [sqlite] speedtest result is obsolete

2005-02-07 Thread Jay
I did a small test to see if performance was linear with time. I wanted to make sure it was suitable for my application. It seems with both indexed and unindexed tables it doesn't take significantly longer to do the 1,000,000th insert than it did the first. =

[sqlite] sqlite & multithreading

2005-02-07 Thread Yogesh Marwaha
Hi! Problem: 1 - I need some help using sqlite3 with multithreading. Here is an overview of present situation: - I am using sqlite 3.0.8 I have two threads (A & B) working at the same time. Thread A is used to query database while thread B is being used for writing to the database.

Re: [sqlite] sqlite thread safe builds

2005-02-07 Thread Christian Smith
On Thu, 3 Feb 2005, Jeff Thompson wrote: >Hi, I'm a sqlite 3.0.8 user on windows only to date. I am using sqlite >in a multi-threaded application and have read and understand the >requirement to define THREADSAFE=1 in order to ensure that sqlite is >built correctly for multi-threaded execution. >

[sqlite] SQLITE crashs

2005-02-07 Thread mqlin
Hi All,I have found a SQL can cause the SQLite version 3.1.1beta to crash:-SELECT TR.ID, (SELECT sum(TRD1.Amount) FROM PB_Transaction TR1 INNER JOIN PB_TransactionDetail TRD1 ON TR1.ID = TRD1.TransactionID WHERE TR1.ID < TR.ID) Balance FROM PB_Transaction TR INNER JOIN

Re: [sqlite] speedtest result is obsolete

2005-02-07 Thread Hugh Gibson
I would be interested to know the results for very large data sets. Indications on the list have been that performance suffers when the number of records gets very big (> 1 million), possibly due to using an internal sort. Hugh

Re: [sqlite] generating database wide unique ROWIDs

2005-02-07 Thread Derrell . Lipman
Jason Jobe <[EMAIL PROTECTED]> writes: > Given that we now have 64-bit ROWID, I have been wanting to provide my own > ROWID generator so that I can encode additional info (such as the the table) > into the ROWID making them unique across the whole database. Then given just > any old ROWID, I

Re: [sqlite] speedtest result is obsolete

2005-02-07 Thread Clay Dowling
Yasuo Ohgaki said: > http://www.ohgaki.net/download/speedtest.html > http://www.ohgaki.net/download/speedtest-pgsql-nosync.html The tests were very interesting. Based on what I see in those reports, any one of the three should be suitable for most tasks, with the engine chosen based on the

Re: [sqlite] Fundamental database use questions

2005-02-07 Thread Clay Dowling
[EMAIL PROTECTED] said: > Which API calls would be required for a complete assessment of readiness? > Would sqlite3_busy_handler be a candidate? I presume callbacks would be > involved as well. There is no need to test for readiness. There are two different interfaces to the database, either

[sqlite] speedtest result is obsolete

2005-02-07 Thread Yasuo Ohgaki
Hi, The speed test result is obsolete http://sqlite.org/speed.html Here is my results. http://www.ohgaki.net/download/speedtest.html http://www.ohgaki.net/download/speedtest-pgsql-nosync.html The later one is without fsync for PostgreSQL. All dbmses are tested with default rpm package