-C A\sfailed\smalloc()\scould\shave\sresulted\sin\sa\ssegfault.\s\sFixed\sby\sthis\scheck-in.\s(CVS\s1102)
-D 2003-09-23T10:25:33
+C Do\sall\sWHERE\sclauses\stests,\seven\sif\san\sindex\sis\sused\sfor\slookup\sso\sthat\nwe\sknow\sthe\stest\scannot\sbe\sFALSE.\s\sThe\stest\smight\send\sup\sbeing\sNULL\sin\swhich\ncase\sit\swould\sneed\sto\sbe\streated\sas\sfalse.\s\sTicket\s#461.\s(CVS\s1103)
+D 2003-09-27T00:41:28
F Makefile.in ab585a91e34bc33928a1b6181fa2f6ebd4fb17e1
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/vdbe.h 3957844e46fea71fd030e78f6a3bd2f7e320fb43
F src/vdbeInt.h 2824bf88895b901b3a8c9e44527c67530e1c0dcb
F src/vdbeaux.c 1145fa169021d7fb3962fab6e99f5f8fc2608f8a
-F src/where.c 83b2a2d26d5c3bea33457a83e541bb1dcf7b1248
+F src/where.c 1e8d20d3997b5231f25b1f377fefe58aa49bf604
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
F test/attach.test c26848402e7ac829e043e1fa5e0eb87032e5d81d
F test/attach2.test 6f98cc2b929d88dc5f82d95d04e9b89b3b5dead3
F test/format3.test b05cb2968841553698290f2833f72894f156024e
F test/func.test 000515779001ac6899eec4b54e65c6e2501279d4
F test/in.test 22de8a3eb27265aab723adc513bea0e76bef70c6
-F test/index.test 1962dbc8c0ef2467195776bdee18ef7cf3ce9b62
+F test/index.test 9295deefbdb6dedbe01be8905f0c448fe5bd4079
F test/insert.test a17b7f7017097afb2727aa5b67ceeb7ab0a120a1
F test/insert2.test c288375a64dad3295044714f0dfed4a193cf067f
F test/intpkey.test 9320af48415c594afd4e15f8ef0daa272e05502e
F test/misc2.test 5818bfafd07535b0437f15c32bed983f3bd363b2
F test/misuse.test a3aa2b18a97e4c409a1fcaff5151a4dd804a0162
F test/notnull.test 7a08117a71e74b0321aaa937dbeb41a09d6eb1d0
-F test/null.test 5c2b57307e4b6178aae825eb65ddbee01e76b0fd
+F test/null.test c14d0f4739f21e929b8115b72bf0c765b6bb1721
F test/pager.test dd31da9bee94a82e2e87e58cf286cfe809f8fc5f
F test/pragma.test e7cb7ffd765c9158868b0b7a3771d54a0d5f5072
F test/printf.test 3ed02f1361402c0767492cd5cef4650e61df8308
F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
-P 4fdd44a5ee5f7beb3cff11bc54fd3022b975b9e6
-R 0074487beb6e741081cb3a63c6722144
+P 4bb256ee3ecd44d71d90556e16bb56c0389fd5b5
+R c6afe2445864efb925570f28ec556288
U drh
-Z 3c9475381ebc19cc18ae14d0f50d9455
+Z e801647f10cab2f01f8d94808db9306f
-4bb256ee3ecd44d71d90556e16bb56c0389fd5b5
\ No newline at end of file
+5aea81488b2d3bcdc009ccf0f0ffcda046e38d79
\ No newline at end of file
** This module contains C code that generates VDBE code used to process
** the WHERE clause of SQL statements.
**
-** $Id: where.c,v 1.81 2003/07/16 00:54:31 drh Exp $
+** $Id: where.c,v 1.82 2003/09/27 00:41:28 drh Exp $
*/
#include "sqliteInt.h"
){
if( pX->op==TK_EQ ){
sqliteExprCode(pParse, pX->pRight);
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
if( pX->op==TK_IN && nColumn==1 ){
pLevel->inOp = OP_Next;
pLevel->inP1 = pX->iTable;
}
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
}
&& aExpr[k].p->pRight->iColumn==pIdx->aiColumn[j]
){
sqliteExprCode(pParse, aExpr[k].p->pLeft);
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
}
&& aExpr[k].p->pLeft->iColumn==pIdx->aiColumn[j]
){
sqliteExprCode(pParse, aExpr[k].p->pRight);
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
if( aExpr[k].idxRight==iCur
&& aExpr[k].p->pRight->iColumn==pIdx->aiColumn[j]
){
sqliteExprCode(pParse, aExpr[k].p->pLeft);
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
}
){
sqliteExprCode(pParse, pExpr->pRight);
leFlag = pExpr->op==TK_LE;
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
if( aExpr[k].idxRight==iCur
){
sqliteExprCode(pParse, pExpr->pLeft);
leFlag = pExpr->op==TK_GE;
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
}
){
sqliteExprCode(pParse, pExpr->pRight);
geFlag = pExpr->op==TK_GE;
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
if( aExpr[k].idxRight==iCur
){
sqliteExprCode(pParse, pExpr->pLeft);
geFlag = pExpr->op==TK_LE;
- aExpr[k].p = 0;
+ /* aExpr[k].p = 0; // See ticket #461 */
break;
}
}
# This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE INDEX statement.
#
-# $Id: index.test,v 1.23 2003/06/15 23:42:25 drh Exp $
+# $Id: index.test,v 1.24 2003/09/27 00:41:28 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
execsql {
SELECT c FROM t6 WHERE a<'abc';
}
-} {3 5 2 1}
+} {5 2 1}
do_test index-14.9 {
execsql {
SELECT c FROM t6 WHERE a<='abc';
}
-} {3 5 2 1 4}
+} {5 2 1 4}
do_test index-14.10 {
execsql {
SELECT c FROM t6 WHERE a<='';
}
-} {3 5 2 1}
+} {5 2 1}
do_test index-14.11 {
execsql {
SELECT c FROM t6 WHERE a<'';
}
-} {3 5}
+} {5}
integrity_check index-14.12
do_test index-15.1 {
}
} {1 2 3}
+# Ticket #461 - Make sure nulls are handled correctly when doing a
+# lookup using an index.
+#
+do_test null-8.1 {
+ execsql {
+ CREATE TABLE t4(x,y);
+ INSERT INTO t4 VALUES(1,11);
+ INSERT INTO t4 VALUES(2,NULL);
+ SELECT x FROM t4 WHERE y=NULL;
+ }
+} {}
+do_test null-8.2 {
+ execsql {
+ SELECT x FROM t4 WHERE y IN (33,NULL);
+ }
+} {}
+do_test null-8.3 {
+ execsql {
+ SELECT x FROM t4 WHERE y<33 ORDER BY x;
+ }
+} {1}
+do_test null-8.4 {
+ execsql {
+ SELECT x FROM t4 WHERE y>6 ORDER BY x;
+ }
+} {1}
+do_test null-8.5 {
+ execsql {
+ SELECT x FROM t4 WHERE y!=33 ORDER BY x;
+ }
+} {1}
+do_test null-8.11 {
+ execsql {
+ CREATE INDEX t4i1 ON t4(y);
+ SELECT x FROM t4 WHERE y=NULL;
+ }
+} {}
+do_test null-8.12 {
+ execsql {
+ SELECT x FROM t4 WHERE y IN (33,NULL);
+ }
+} {}
+do_test null-8.13 {
+ execsql {
+ SELECT x FROM t4 WHERE y<33 ORDER BY x;
+ }
+} {1}
+do_test null-8.14 {
+ execsql {
+ SELECT x FROM t4 WHERE y>6 ORDER BY x;
+ }
+} {1}
+do_test null-8.15 {
+ execsql {
+ SELECT x FROM t4 WHERE y!=33 ORDER BY x;
+ }
+} {1}
+
finish_test