-C Fix\sfor\sbug\s#7:\sCorrectly\sdisplay\sthe\sP3\soperand\sin\sa\sVDBE\strace\swhen\sthe\noperand\sis\sreally\sa\spointer\sto\sa\sstructure.\s(CVS\s512)
-D 2002-04-02T01:44:51
+C Fix\sfor\sbug\s#6:\sCorrectly\shandle\sfunctions\sin\sthe\sWHERE\sclause\sof\sa\sjoin.\s(CVS\s513)
+D 2002-04-02T01:58:58
F Makefile.in 50f1b3351df109b5774771350d8c1b8d3640130d
F Makefile.template 89e373b2dad0321df00400fa968dc14b61a03296
F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0
F src/util.c b34cd91387bbfdc79319ea451a7d120cef478120
F src/vdbe.c 3cebe9f77cac311a3c537587258946d04a09c58f
F src/vdbe.h f9be1f6e9a336c3ff4d14ea7489ee976e07460cc
-F src/where.c 34d91fd5d822c2663caeb023f72d60df316ebf29
+F src/where.c e6292ab9d41aa55005bcca75e6d5e69139fad61b
F test/all.test 6aa106eee4d7127afa5cee97c51a783a79694ead
F test/bigrow.test 8ab252dba108f12ad64e337b0f2ff31a807ac578
F test/btree.test bf326f546a666617367a7033fa2c07451bd4f8e1
F test/quote.test 286db944717afa9a9bf829dd85e59185c65d5435
F test/rowid.test 4c55943300cddf73dd0f88d40a268cab14c83274
F test/select1.test 572d53f7b28c35a1efdce207f7579523358ba637
-F test/select2.test ed2c1882857106b85478f54f67000e14966be4c4
+F test/select2.test 7b59fb17647eda8c7e21d790d4045e30699982af
F test/select3.test 9469c332250a75a0ef1771fb5da62dc04ec77f18
F test/select4.test 29a2ffb187f3d8b6ca42a0a6b619e9cabe12e228
F test/select5.test c2a6c4a003316ee42cbbd689eebef8fdce0db2ac
F www/arch.png 82ef36db1143828a7abc88b1e308a5f55d4336f4
F www/arch.tcl 72a0c80e9054cc7025a50928d28d9c75c02c2b8b
F www/c_interface.tcl 567cda531aac9d68a61ef02e26c6b202bd856db2
-F www/changes.tcl bb47ad160743e11dba5a4b73477150b6859ab1a3
+F www/changes.tcl 7ba1054ca1c3119f305f7bbaa6a69bbff2f52410
F www/conflict.tcl 81dd21f9a679e60aae049e9dd8ab53d59570cda2
F www/crosscompile.tcl 3622ebbe518927a3854a12de51344673eb2dd060
F www/download.tcl 29aa6679ca29621d10613f60ebbbda18f4b91c49
F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279
F www/tclsqlite.tcl 829b393d1ab187fd7a5e978631b3429318885c49
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P 0cb5cfa814bceecea1a346535cac24ec8e2941d7
-R e07a70b33336e9b181f22c86f5352ca5
+P 734dde765b38d61feaa5520e6481c77022367892
+R fc0491616bb288b6a30cabaf5c86972c
U drh
-Z 9c1b0b9c16e5f7f216788d912c729dd6
+Z 1732047b7e97478437e3cc52f209689b
** the WHERE clause of SQL statements. Also found here are subroutines
** to generate VDBE code to evaluate expressions.
**
-** $Id: where.c,v 1.38 2002/03/02 17:04:09 drh Exp $
+** $Id: where.c,v 1.39 2002/04/02 01:58:58 drh Exp $
*/
#include "sqliteInt.h"
if( p->pLeft ){
mask |= exprTableUsage(base, p->pLeft);
}
+ if( p->pList ){
+ int i;
+ for(i=0; i<p->pList->nExpr; i++){
+ mask |= exprTableUsage(base, p->pList->a[i].pExpr);
+ }
+ }
return mask;
}
# This file implements regression tests for SQLite library. The
# focus of this file is testing the SELECT statement.
#
-# $Id: select2.test,v 1.16 2001/11/23 00:24:13 drh Exp $
+# $Id: select2.test,v 1.17 2002/04/02 01:58:58 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set sqlite_search_count
} {29999}
+# Make sure we can optimize functions in the WHERE clause that
+# use fields from two or more different table. (Bug #6)
+#
+do_test select2-4.1 {
+ execsql {
+ CREATE TABLE aa(a);
+ CREATE TABLE bb(b);
+ INSERT INTO aa VALUES(1);
+ INSERT INTO aa VALUES(3);
+ INSERT INTO bb VALUES(2);
+ INSERT INTO bb VALUES(4);
+ SELECT * FROM aa, bb WHERE max(a,b)>2;
+ }
+} {1 4 3 2 3 4}
+
finish_test
puts "<DD><P><UL>$desc</UL></P></DD>"
}
-chng {2002 Mar 31 (2.4.5)} {
+chng {2002 Apr 01 (2.4.5)} {
+<li>Bug fix: Correctly handle functions that appear in the WHERE clause
+ of a SELECT.</li>
+<li>When the PRAGMA vdbe_trace=ON is set, correctly print the P3 operand
+ value when it is a pointer to a structure rather than a pointer to
+ a string.</li>
<li>When inserting an explicit NULL into an INTEGER PRIMARY KEY, convert
the NULL value into a unique key automatically.</li>
}