-C The\sORDER\sBY\sLIMIT\soptimization\sis\snot\svalid\sunless\sthe\sinner-most\sIN\soperator\nloop\sis\sactually\sused\sby\sthe\squery\splan.\nFix\sfor\sticket\s[0c4df46116e90f92].
-D 2016-09-07T12:08:37.662
+C Correct\saffinity\scomputations\sfor\sa\sSELECT\son\sthe\sRHS\sof\san\sIN\soperator.\nFix\sfor\sticket\s[199df4168c].
+D 2016-09-07T12:20:45.996
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
F src/walker.c 0f142b5bd3ed2041fc52d773880748b212e63354
F src/where.c 4bbc3f1dcda64c96ed5f0ffe51be7c0d7adb6c62
F src/whereInt.h e5b939701a7ceffc5a3a8188a37f9746416ebcd0
-F src/wherecode.c 99707d11907c71d289ee9553d2d1a22f1fd8ba41
+F src/wherecode.c 019a050e92526bd6734cca7ca7673c9eb8d0ec32
F src/whereexpr.c d7dcbf14ce1b5876c1f76496162c30fcba669563
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
F test/tt3_stress.c c57d804716165811d979d4a719e05baccd79277f
F test/tt3_vacuum.c 1753f45917699c9c1f66b64c717a717c9379f776
F test/types.test bf816ce73c7dfcfe26b700c19f97ef4050d194ff
-F test/types2.test 3555aacf8ed8dc883356e59efc314707e6247a84
+F test/types2.test 1aeb81976841a91eef292723649b5c4fe3bc3cac
F test/types3.test 99e009491a54f4dc02c06bdbc0c5eea56ae3e25a
F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
F test/unique2.test 3674e9f2a3f1fbbfd4772ac74b7a97090d0f77d2
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P e5c30f227b3f6cae18cc85655149636372592bf8
-Q +820644b886f81e991fceb5f1c3290b8959b34528
-R 9e05f10224481d9859c9095e6e7d395f
+P b4f8be1f3258823b3a8f316c92f9019f71ef86a0
+R 742bc7defda07dd553a21f17dc41fbef
U drh
-Z 1319827703ca94f3fde0a55b291e91eb
+Z 287fe50a673ea0ec508c0e86ae809b4b
sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
}
}
- testcase( pTerm->eOperator & WO_ISNULL );
- testcase( pTerm->eOperator & WO_IN );
- if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
+ if( (pTerm->eOperator & WO_IN)!=0 ){
+ if( pTerm->pExpr->flags & EP_xIsSelect ){
+ /* No affinity ever needs to be (or should be) applied to a value
+ ** from the RHS of an "? IN (SELECT ...)" expression. The
+ ** sqlite3FindInIndex() routine has already ensured that the
+ ** affinity of the comparison has been applied to the value. */
+ if( zAff ) zAff[j] = SQLITE_AFF_BLOB;
+ }
+ }else if( (pTerm->eOperator & WO_ISNULL)==0 ){
Expr *pRight = pTerm->pExpr->pRight;
if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
test_boolset types2-8.8 {o IN (SELECT t FROM t4)} {7}
test_boolset types2-8.9 {i IN (SELECT o FROM t4)} {9 10 11 12}
test_boolset types2-8.6 {n IN (SELECT o FROM t4)} {9 10 11 12}
- test_boolset types2-8.7 {t IN (SELECT o FROM t4)} {9 11}
+ test_boolset types2-8.7 {t IN (SELECT o FROM t4)} {}
test_boolset types2-8.8 {o IN (SELECT o FROM t4)} {9 10}
}