* Dan Kennedy: >> My concern is about sqlite3_step(UPDATE) without a following >> sqlite3_reset(UPDATE). Perhaps I should change my wrapper to >> unconditionally call sqlite3_reset() after DML-related sqlite3_step(), >> whether the stepping operation succeeded or not. > > For a DML statement, I usually just do: > > sqlite3_step(pStmt); > rc = sqlite3_reset(pStmt); > if( rc!=SQLITE_OK ){ > /* Handle error */ > } > > I don't see why you would want to call step() but not reset() for a > DML operation. And since reset() always returns either the same or a > more specific error code, there isn't too much reason to ever catch > the return value of step(). IMO.
The reset operation acquires another mutex. I have not investigated this in detail yet, but even in the non-contended case, this mutex operation showed up in profiles for me (with a heavy INSERT workload, rows mostly in the order of the INTEGER NOT NULL PRIMARY KEY). _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users