1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Enable constant expression factoring even if no tables are read and no

transaction is started.

FossilOrigin-Name: a45b87713c0afca2be2ace9500513620a024c0a2
This commit is contained in:
drh
2014-02-08 04:24:37 +00:00
parent aceb31b120
commit e0e261a473
4 changed files with 15 additions and 12 deletions

View File

@@ -1616,6 +1616,12 @@ Vdbe *sqlite3GetVdbe(Parse *pParse){
if( v==0 ){
v = pParse->pVdbe = sqlite3VdbeCreate(pParse);
if( v ) sqlite3VdbeAddOp0(v, OP_Init);
if( pParse->pToplevel==0
&& OptimizationEnabled(pParse->db,SQLITE_FactorOutConst)
){
pParse->okConstFactor = 1;
}
}
return v;
}