1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Pull the latest trunk changes into the sessions branch.

FossilOrigin-Name: 5d95b42946b5cf0346164aebe0a8c4f37527bc31
This commit is contained in:
drh
2011-06-23 02:11:11 +00:00
11 changed files with 167 additions and 42 deletions

View File

@@ -459,6 +459,14 @@ end_of_step:
return (rc&db->errMask);
}
/*
** The maximum number of times that a statement will try to reparse
** itself before giving up and returning SQLITE_SCHEMA.
*/
#ifndef SQLITE_MAX_SCHEMA_RETRY
# define SQLITE_MAX_SCHEMA_RETRY 5
#endif
/*
** This is the top-level implementation of sqlite3_step(). Call
** sqlite3Step() to do most of the work. If a schema error occurs,
@@ -477,7 +485,7 @@ int sqlite3_step(sqlite3_stmt *pStmt){
db = v->db;
sqlite3_mutex_enter(db->mutex);
while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
&& cnt++ < 5
&& cnt++ < SQLITE_MAX_SCHEMA_RETRY
&& (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){
sqlite3_reset(pStmt);
v->expired = 0;