/ Changes On Branch tkt-e1e07ef2
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch tkt-e1e07ef2 Excluding Merge-Ins

This is equivalent to a diff from ca4ddfefc1 to ba7870e292

2019-06-16
14:56
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. Fix for [e1e07ef2]. (check-in: 5411087048 user: drh tags: trunk)
08:58
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. Fix for [e1e07ef2]. (Closed-Leaf check-in: ba7870e292 user: dan tags: tkt-e1e07ef2)
2019-06-15
15:32
Fix minor problems in the test code in test_demovfs.c. (check-in: ca4ddfefc1 user: dan tags: trunk)
15:27
Add extra test case for one of the problems fixed by the previous commit. (check-in: 0bbceebb12 user: dan tags: trunk)

Changes to src/expr.c.

3383
3384
3385
3386
3387
3388
3389
3390


3391
3392
3393
3394
3395
3396
3397
3383
3384
3385
3386
3387
3388
3389

3390
3391
3392
3393
3394
3395
3396
3397
3398







-
+
+







}

/*
** Convert a scalar expression node to a TK_REGISTER referencing
** 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;
  ExprClearProperty(p, EP_Skip);
}

/*

Changes to test/between.test.

115
116
117
118
119
120
121




















122
123
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


} {4 2 25 27 sort t1 i1zyx}
do_test between-1.5.3 {
  queryplan {
    SELECT * FROM t1 WHERE 26 BETWEEN y AND +z ORDER BY +w
  }
} {4 2 25 27 sort t1 *}

#-------------------------------------------------------------------------
reset_db
do_execsql_test between-2.0 {
  CREATE TABLE t1(x TEXT, y TEXT COLLATE nocase);
  INSERT INTO t1 VALUES('0', 'abc');
}

foreach {tn expr res} {
  1 "x                BETWEEN 1 AND '5'" 0
  2 "x COLLATE binary BETWEEN 1 AND '5'" 0
  3 "x COLLATE nocase BETWEEN 1 AND '5'" 0

  4 "y                  BETWEEN 'A' AND 'B'" 1
  5 "y COLLATE nocase   BETWEEN 'A' AND 'B'" 1
  6 "y COLLATE binary   BETWEEN 'A' AND 'B'" 0
  7 "(y COLLATE binary) BETWEEN 'A' AND 'B'" 0
} {
  set sql "SELECT $expr FROM t1"
  do_execsql_test between-2.1.$tn $sql $res
}

finish_test