diff --git a/manifest b/manifest index 4535299e32..e5f921a3d2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sminor\sproblem\sin\sprogress.test.\sNo\scode\schanges. -D 2013-08-21T07:25:03.850 +C Candidate\sfix\sfor\s[d666d600a6]. +D 2013-08-21T12:04:32.485 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -172,7 +172,7 @@ F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac F src/ctime.c 4262c227bc91cecc61ae37ed3a40f08069cfa267 F src/date.c 067a81c9942c497aafd2c260e13add8a7d0c7dd4 F src/delete.c 2317c814866d9aa71fea16b3faf4fdd4d6a49b94 -F src/expr.c 42d8235af422661ab80be097bebca485b33e2e14 +F src/expr.c 6bab61c757c4c4c94a92e98d507025d5d18afd3c F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c 914a6bbd987d857c41ac9d244efa6641f36faadb F src/func.c 5c50c1ea31fd864b0fe921fe1a8d4c55acd609ef @@ -367,7 +367,7 @@ F test/close.test 340bd24cc58b16c6bc01967402755027c37eb815 F test/closure01.test dbb28f1ea9eeaf0a53ec5bc0fed352e479def8c7 F test/coalesce.test cee0dccb9fbd2d494b77234bccf9dc6c6786eb91 F test/collate1.test b709989e6e6ff6e1d2bd64231c2c1d8146846c9e -F test/collate2.test 285cef1b58ce2b3cf074a386f763ce753c81c97f +F test/collate2.test 96c4cded721b7df7fead3669bd5e5e56a1c1e72d F test/collate3.test 79558a286362cb9ed603c6fa543f1cda7f563f0f F test/collate4.test 031f7265c13308b724ba3c49f41cc04612bd92b1 F test/collate5.test 65d928034d30d2d263a80f6359f7549ee1598ec6 @@ -1105,7 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 356c6c59311eaf7d5633476f635e94a12b8b3924 -R 3810158b358b1ad8cbaf587b4d9b2a39 +P a95ae93b32a9ad2ae017124ed0881802c3c741c0 +R 35cc26635e6bc873eb202f0021417291 U dan -Z f1931decb20295530674ca6fa0949acd +Z 642302ea64d9f9943d5c6662ae753a34 diff --git a/manifest.uuid b/manifest.uuid index ef7d2261d6..f9cfd5c1c7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a95ae93b32a9ad2ae017124ed0881802c3c741c0 \ No newline at end of file +781592f32c8e1dcd59954c17211cf61349d1c0b1 \ No newline at end of file diff --git a/src/expr.c b/src/expr.c index e857193b8b..dd4f5de15f 100644 --- a/src/expr.c +++ b/src/expr.c @@ -114,8 +114,7 @@ CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr){ p = p->pLeft; continue; } - assert( op!=TK_REGISTER || p->op2!=TK_COLLATE ); - if( op==TK_COLLATE ){ + if( op==TK_COLLATE || (op==TK_REGISTER && p->op2==TK_COLLATE) ){ pColl = sqlite3GetCollSeq(pParse, ENC(db), 0, p->u.zToken); break; } @@ -3505,6 +3504,7 @@ static void exprCodeBetween( compRight.pLeft = &exprX; compRight.pRight = pExpr->x.pList->a[1].pExpr; exprX.iTable = sqlite3ExprCodeTemp(pParse, &exprX, ®Free1); + exprX.op2 = exprX.op; exprX.op = TK_REGISTER; if( jumpIfTrue ){ sqlite3ExprIfTrue(pParse, &exprAnd, dest, jumpIfNull); diff --git a/test/collate2.test b/test/collate2.test index c758b0a6db..a23728b15f 100644 --- a/test/collate2.test +++ b/test/collate2.test @@ -17,6 +17,8 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl +set ::testprefix collate2 + # # Tests are organised as follows: # @@ -693,4 +695,33 @@ do_test collate2-5.5 { } } {aa aa} +do_execsql_test 6.1 { + CREATE TABLE t1(x); + INSERT INTO t1 VALUES('b'); + INSERT INTO t1 VALUES('B'); +} +do_execsql_test 6.2 { + SELECT * FROM t1 WHERE x COLLATE nocase BETWEEN 'a' AND 'c'; +} {b B} +do_execsql_test 6.3 { + SELECT * FROM t1 WHERE x BETWEEN 'a' COLLATE nocase AND 'c' COLLATE nocase; +} {b B} +do_execsql_test 6.4 { + SELECT * FROM t1 + WHERE x COLLATE nocase BETWEEN 'a' COLLATE nocase AND 'c' COLLATE nocase; +} {b B} +do_execsql_test 6.5 { + SELECT * FROM t1 WHERE +x COLLATE nocase BETWEEN 'a' AND 'c'; +} {b B} +do_execsql_test 6.6 { + SELECT * FROM t1 WHERE +x BETWEEN 'a' COLLATE nocase AND 'c' COLLATE nocase; +} {b B} +do_execsql_test 6.7 { + SELECT * FROM t1 + WHERE +x COLLATE nocase BETWEEN 'a' COLLATE nocase AND 'c' COLLATE nocase; +} {b B} + +finish_test + + finish_test