I compiled your program with MinGW gcc 3.4.2 on Windows with 
sqlite-amalgamation-3_5_3.zip.

  gcc -I. ged.c sqlite3.c -o ged.exe

It runs fine. If another sqlite3 process issues a query like:

  select * from test;

while ged.exe is running, then ged.exe will exit with:

  Creating 100000 rows...
  died on row 2595
  SQL error 2: database is locked

So I'm wondering if another process accessed your database 
file while it was running. Or perhaps, are you running antivirus 
software on your PC?

What happens if you retry sqlite3_exec a few times after failure 
instead of exitting?  (throw in Sleep(50) after each failure for 
good measure)


--- Ged Murphy <[EMAIL PROTECTED]> wrote:

> I am doing some programmatic stress / benchmark testing on sqlite in the
> hope it'll be of use to me in my project.
> 
> I'm performing some simple stress tests to gauge read/write speeds, whereby
> I fill a table with a large amount rows
> 
> However,  I hit the following problem on writing:
> 
>   Creating 100000 rows...
> 
>   died on row 1075
> 
>   SQL error 2: unable to open database fi
> 
>   Press any key to continue . . .
> 
> I'm using version 3.5.2 and my stress test code (written in C) is attached.
> 
> Does anyone have any ideas as to why it fails?



      
____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to