mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Make sure the sqlite3_trace() callback is invoked, even if the prepared
statement was marked "expired" before it ever entered sqlite3_step(). Ticket [11d5aa455e0d98f3c1e6a08]. FossilOrigin-Name: 0d4d3df4bc5e75ce1543b5539a1e9e279d2a062f
This commit is contained in:
@@ -513,10 +513,12 @@ int sqlite3_step(sqlite3_stmt *pStmt){
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
v->doingRerun = 0;
|
||||
while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
|
||||
&& cnt++ < SQLITE_MAX_SCHEMA_RETRY
|
||||
&& (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){
|
||||
&& cnt++ < SQLITE_MAX_SCHEMA_RETRY ){
|
||||
int savedPc = v->pc;
|
||||
rc2 = rc = sqlite3Reprepare(v);
|
||||
if( rc!=SQLITE_OK) break;
|
||||
sqlite3_reset(pStmt);
|
||||
v->doingRerun = 1;
|
||||
v->doingRerun = savedPc>=0;
|
||||
assert( v->expired==0 );
|
||||
}
|
||||
if( rc2!=SQLITE_OK ){
|
||||
|
Reference in New Issue
Block a user