mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Fix to the optimization of check-in [a47efb7c8520a011] that reads the values
of expressions used in an index-on-expression directly from the index rather than recomputing the value. If the expression has a top-level COLLATE or unlikely() operator, be sure to clear the corresponding flags prior to converting it into a TK_COLUMN expression. Failure to do this is most likely harmless in production, but might cause an assertion fault in debugging builds. Ticket [b0cb8aff561a6dcd]. Test cases in TH3. FossilOrigin-Name: 56539e1c132632c075efc217ad5951a35e4459605ac128914aec3a7be1e25718
This commit is contained in:
@@ -1145,6 +1145,9 @@ static int whereIndexExprTransNode(Walker *p, Expr *pExpr){
|
||||
pExpr->iTable = pX->iIdxCur;
|
||||
pExpr->iColumn = pX->iIdxCol;
|
||||
pExpr->y.pTab = 0;
|
||||
testcase( ExprHasProperty(pExpr, EP_Skip) );
|
||||
testcase( ExprHasProperty(pExpr, EP_Unlikely) );
|
||||
ExprClearProperty(pExpr, EP_Skip|EP_Unlikely);
|
||||
return WRC_Prune;
|
||||
}else{
|
||||
return WRC_Continue;
|
||||
|
||||
Reference in New Issue
Block a user