I have an application that does bulk INSERTS into a table. Simplified
pseudo code is below:

sqlite3_open(dbh);
sqlite3_prepare(stmt);

for (i=0; i < 100000; i++) {
   sqlite3_bind(i);
   sqlite3_step(stmt);
   sqlite3_reset(stmt);
}

sqlite3_close(dbh);

While the bulk INSERTs are being performed, I have a small shell
script that runs sqlite3 database.db "select count(*) from table" in
loop and sleeps 1 seconds between iterations.

Occasionally, sqlite3_step returns an error probably due to
concurrency issues. This is fine.

However, that puzzles me is that if PRAGMA cache_size = 0 is set on
dbh, return code of sqlite3_step is SQLITE_IOERR. If set to default,
2048, it is SQLITE_BUSY. If set to 128, it's a mix of those 2 codes.

I'm running 3.4.0 on OpenBSD 4.1/i386.

Is this the intended behavior?

// ssehic

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

Reply via email to