mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix problems in the constant propagation optimization that were introduced
by check-in [1c3e5c20a9e6f501]. Fix for ticket [1dcb4d44964846ad] FossilOrigin-Name: c9a8defcef35a1fee6bcbb88252a2d0076dabe8381b0128b2257b5b5cc494e0f
This commit is contained in:
@@ -4166,9 +4166,8 @@ static void constInsert(
|
||||
assert( pColumn->op==TK_COLUMN );
|
||||
assert( sqlite3ExprIsConstant(pValue) );
|
||||
|
||||
if( !ExprHasProperty(pValue, EP_FixedCol) && sqlite3ExprAffinity(pValue)!=0 ){
|
||||
return;
|
||||
}
|
||||
if( ExprHasProperty(pColumn, EP_FixedCol) ) return;
|
||||
if( sqlite3ExprAffinity(pValue)!=0 ) return;
|
||||
if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pConst->pParse,pExpr)) ){
|
||||
return;
|
||||
}
|
||||
@@ -4191,9 +4190,6 @@ static void constInsert(
|
||||
if( pConst->apExpr==0 ){
|
||||
pConst->nConst = 0;
|
||||
}else{
|
||||
if( ExprHasProperty(pValue, EP_FixedCol) ){
|
||||
pValue = pValue->pLeft;
|
||||
}
|
||||
pConst->apExpr[pConst->nConst*2-2] = pColumn;
|
||||
pConst->apExpr[pConst->nConst*2-1] = pValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user