Re: [sqlite] System function with Sqlite

2008-08-12 Thread Chris Brown
> Are you closing standard output or standard input? No i'm not closing either. At the moment I can replicate this issue simply by having the code sample in my previous post inside my main function with the sqlite database variable declaration and thats it. If I assign the result of the second

Re: [sqlite] System function with Sqlite

2008-08-12 Thread John Stanton
Chris Brown wrote: >>The "fossil" configuration management system (used to control the >>documentation of SQLite - see http://www.fossil-scm.org/ for details >>and http://www.sqlite.org/docsrc/timeline for an example) calls >>system() after sqlite3_open() in multiple places and it works just

Re: [sqlite] System function with Sqlite

2008-08-12 Thread Chris Brown
> The "fossil" configuration management system (used to control the > documentation of SQLite - see http://www.fossil-scm.org/ for details > and http://www.sqlite.org/docsrc/timeline for an example) calls > system() after sqlite3_open() in multiple places and it works just > fine on Linux, OSX,

Re: [sqlite] System function with Sqlite

2008-08-12 Thread Peter Holmes
int main(int argc, char **argv) { int i; system("rm ppi.dbs ; sqlite3 ppi.dbs \".read ppi_create.sql\""); wait(NULL); /* open the database */ db_connect(); /* which calls sqlite3_open() */ system("echo what?"); wait(NULL); . . . } Works for me

[sqlite] System function with Sqlite

2008-08-12 Thread Chris Brown
Hi all I have an application written in C using Sqlite 3.5.9 on MontaVista Linux. I am required to call the 'system()' function from within my code to run external programs. Under normal circumstances this works without problems. However as soon as I have used Sqlite from within my code I am

Re: [sqlite] Looking for generic speed test results

2008-08-12 Thread Noah Hart
Will do. Noah -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of D. Richard Hipp Sent: Tuesday, August 12, 2008 11:55 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Looking for generic speed test results Importance: High On Aug 12,

Re: [sqlite] Looking for generic speed test results

2008-08-12 Thread D. Richard Hipp
On Aug 12, 2008, at 2:46 PM, Noah Hart wrote: >> >> If you want to do a meaningful speed comparison, then speed1.test >> should probably be modified to set PRAGMA synchronous=OFF. > > Would this be true for all the speed tests? I'll open a ticket to > make > that request. The speed1.test

Re: [sqlite] Looking for generic speed test results

2008-08-12 Thread Noah Hart
>> Such as >> >> SQLite 3.6.1 running under "Vista 32 bit, 2.4GHz, 3G ram, 5000rpmDisk" >> >> speed1-insert1...326279489 uS 10.8195909732183 row/s > >Right off the bat, I notice that I'm getting 101871.8 rows/s under >Linux. Almost 10,000 times faster. These were just dummy numbers

Re: [sqlite] Looking for generic speed test results

2008-08-12 Thread Noah Hart
Thanks Peter, I think that to start with, I am only interested in "generic" amalgamation compilations. These would run the standard TCL test scripts speed1, speed2, speed3, speed4. That would be a good place to start. Noah -Original Message- From: On Behalf Of Peter Holmes I'd be glad

Re: [sqlite] "unable to open database file" on DROP

2008-08-12 Thread Dennis Cote
D. Richard Hipp wrote: > > Adding new result codes is complicated. There exist applications that > only check for the current set of result codes. So if new result > codes are added, those applications might fail. Hence adding new > result codes can lead to compatibility problems in

Re: [sqlite] Looking for generic speed test results

2008-08-12 Thread D. Richard Hipp
On Aug 12, 2008, at 2:15 PM, Noah Hart wrote: > I understand that memory, disk and processor all play a part in the > speed test results. > > However, I am looking for some benchmarks that would give ballpark > figures for the results. > > Are people willing to post their speed test results,

Re: [sqlite] Looking for generic speed test results

2008-08-12 Thread Peter Holmes
I'd be glad to post results for Ubuntu 7.10 on a Dell Inspiron 530 (Dual Core 1.6Ghz) if you're interested. Just supply source code, compile options you want me to use, etc. Noah Hart wrote: > I understand that memory, disk and processor all play a part in the > speed test results. > >

[sqlite] Looking for generic speed test results

2008-08-12 Thread Noah Hart
I understand that memory, disk and processor all play a part in the speed test results. However, I am looking for some benchmarks that would give ballpark figures for the results. Are people willing to post their speed test results, along with OS, CPU speed and Memory characteristics?" Such as

Re: [sqlite] Problem building on Solaris

2008-08-12 Thread Larry Martell
On Fri, Aug 8, 2008 at 3:13 AM, rahed <[EMAIL PROTECTED]> wrote: > "Larry Martell" > <[EMAIL PROTECTED]> writes: > >> I'm trying to build the amalgamation on Solaris, and it's failing: >> >>> make >> cd . && /bin/bash >> /home/martella/sqlite3/sqlite-amalgamation-3.6.1/missing --run >> aclocal-1.9

Re: [sqlite] "unable to open database file" on DROP

2008-08-12 Thread D. Richard Hipp
On Aug 12, 2008, at 1:37 PM, Dennis Cote wrote: > Igor Tandetnik wrote: >> "Robert Latest" <[EMAIL PROTECTED]> >> wrote in message >> news:[EMAIL PROTECTED] >>> $ sqlite3 /cygdrive/d/cl_hist_dat/clhist.sqlite >>> SQLite version 3.5.1 >>> Enter ".help" for instructions >>> sqlite> create view y

Re: [sqlite] setting a foreign key in a trigger

2008-08-12 Thread Dennis Cote
Bruce Clift wrote: > I'm having difficulty writing a trigger in SQLite to do what I need to do. > I have very little background in SQL, so I might well be missing something > obvious. Any help would be greatly appreciated. > > I have a table foo with a column that is a foreign key to table bar.

Re: [sqlite] "unable to open database file" on DROP

2008-08-12 Thread Dennis Cote
Igor Tandetnik wrote: > "Robert Latest" <[EMAIL PROTECTED]> > wrote in message > news:[EMAIL PROTECTED] >> $ sqlite3 /cygdrive/d/cl_hist_dat/clhist.sqlite >> SQLite version 3.5.1 >> Enter ".help" for instructions >> sqlite> create view y as select * from tools; >> sqlite> create temporary view z

[sqlite] Unexpected interaction between virtual tables and the IN operator.

2008-08-12 Thread Scott Hess
[Full text of an example later in the email.] For a query like this: SELECT * FROM t_ft WHERE docid = (SELECT rowid FROM t WHERE label = 'y'); fulltextBestIndex() gets a SQLITE_INDEX_CONSTRAINT_EQ on the docid column, which can be efficiently accessed, so fulltextFilter() can do a very

Re: [sqlite] Proposed removal of (mis-)feature

2008-08-12 Thread Dennis Cote
Eugene Wee wrote: >> >> If it does not have any compatibility with any other database, >> ONLY then I say that one should drop #3 quoting convention. >> > I believe that MySQL allows double quotes to be used as string > delimiters by default, but then this would not be a compatibility break >

Re: [sqlite] about sqlite database

2008-08-12 Thread Dennis Cote
janard wrote: > In sqlite whether can we rotate content in database . > That means i want to restirct my database to some size,if it exceeds that > size it has to replace first entry. > Can anybody help.Thanks in advance > You can manage a fifo table using triggers as shown here:

Re: [sqlite] API to find number of rows returned by select query

2008-08-12 Thread Igor Tandetnik
manohar s <[EMAIL PROTECTED]> wrote: > Is there any SQLite C API to find number of rows returned by select > query? In general, determining the number of rows is as difficult a problem as enumerating all rows. There is no magic shortcut. The API to find the number of rows in resultset is

Re: [sqlite] Clone SQLite databases

2008-08-12 Thread Dennis Cote
csabi81 wrote: > Thanks Steve, I think I am on the right way. > It is a difference between the page sizes of the two databases. I have > opened each database with Firefox SQLite Manager, and at the DB Settings I > have seen a lot of differences, such as page size, Cache size, max page > count etc.

[sqlite] API to find number of rows returned by select query

2008-08-12 Thread manohar s
Hi all, Is there any SQLite C API to find number of rows returned by select query? right now we have to do workaround like this, "Select count(*) as Count from (select .) ". Regards, Manohar.S -- hope is the only thing which keeps us all happy http://sqlyog.wordpress.com/

Re: [sqlite] Corrupted database repairing

2008-08-12 Thread Alexey Pechnikov
It's very dificult decision. I'm prefer to use some callback function for logging all queries. But I don't know how to realise this callback - trace and profile callbacks can't show query string with variables values. 2008/8/11, Dennis Cote <[EMAIL PROTECTED]>: > Alexey Pechnikov wrote: >> >> Can