1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add the experimental sqlite3_reoptimize() API.

FossilOrigin-Name: 9bd6f3d8864d422fe42074688b191915b27ad8ea
This commit is contained in:
dan
2009-10-15 18:35:38 +00:00
parent 9bd42e96ac
commit 937d0dea4f
17 changed files with 880 additions and 84 deletions

View File

@@ -1128,6 +1128,16 @@ static int dbPrepareAndBind(
}
pPreStmt->nParm = iParm;
*ppPreStmt = pPreStmt;
/* Call sqlite3_reoptimize() to optimize the statement according to
** the values just bound to it. If SQLITE_ENABLE_STAT2 is not defined
** or the statement will not benefit from re-optimization, this
** call is a no-op. */
if( SQLITE_OK!=sqlite3_reoptimize(pPreStmt->pStmt) ){
Tcl_SetObjResult(interp, dbTextToObj(sqlite3_errmsg(pDb->db)));
return TCL_ERROR;
}
return TCL_OK;
}