aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2019-06-16 08:58:14 +0000
committerdan <dan@noemail.net>2019-06-16 08:58:14 +0000
commit069d1b1faf819c9d49a299129caeef9774d73b89 (patch)
tree53aa3b07ac695a38881176845eb4c27b4e0e7ad6 /src/expr.c
parente3664dcb4837e94f685606a00aa5da1d4f4c3d3d (diff)
downloadsqlite-069d1b1faf819c9d49a299129caeef9774d73b89.tar.gz
sqlite-069d1b1faf819c9d49a299129caeef9774d73b89.zip
Avoid transforming TK_COLLATE or TK_UNLIKELY Expr nodes to TK_REFERENCE. Instead, transform the uppermost Expr node in the expression tree that is not of this type.
FossilOrigin-Name: ba7870e292919cf6c2f4b65b63fb0420ba2718eb0a797e0ba5302eec551a4238
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index e6dc20222..c4f201a13 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3387,7 +3387,8 @@ void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){
** register iReg. The caller must ensure that iReg already contains
** the correct value for the expression.
*/
-static void exprToRegister(Expr *p, int iReg){
+static void exprToRegister(Expr *pExpr, int iReg){
+ Expr *p = sqlite3ExprSkipCollate(pExpr);
p->op2 = p->op;
p->op = TK_REGISTER;
p->iTable = iReg;