1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Rework the logic that factors constant expressions out of inner loops, making

it both simpler and faster.

FossilOrigin-Name: 8dc5c76c766828d7c28090bec30ff48227e7b140
This commit is contained in:
drh
2013-11-15 01:10:18 +00:00
parent 01752bc805
commit f30a969b80
11 changed files with 82 additions and 167 deletions

View File

@@ -524,6 +524,13 @@ int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
return i;
}
/*
** Free all memory allocations in the pParse object
*/
void sqlite3ParserReset(Parse *pParse){
if( pParse ) sqlite3ExprListDelete(pParse->db, pParse->pConstExpr);
}
/*
** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
*/
@@ -681,6 +688,7 @@ static int sqlite3Prepare(
end_prepare:
sqlite3ParserReset(pParse);
sqlite3StackFree(db, pParse);
rc = sqlite3ApiExit(db, rc);
assert( (rc&db->errMask)==rc );