From: Dmitry Y. <di...@us...> - 2006-02-15 13:34:50
|
Build Version : T2.0.0.12307 Firebird 2.0 Beta 2 (writeBuildNum.sh,v 1.12458 2006/02/15 13:34:40 dimitr Exp ) Update of /cvsroot/firebird/firebird2/src/jrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1777 Modified Files: cmp.cpp rse.cpp Log Message: More clever solution for bug #459059. Deoptimization of NOT ANY is no longer necessary. Index: cmp.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/jrd/cmp.cpp,v retrieving revision 1.195 retrieving revision 1.196 diff -b -U3 -r1.195 -r1.196 --- cmp.cpp 10 Feb 2006 03:28:42 -0000 1.195 +++ cmp.cpp 15 Feb 2006 13:34:35 -0000 1.196 @@ -3500,22 +3500,9 @@ validate_expr); break; - case nod_not: - // See below - if (node->nod_arg[0]->nod_type == nod_ansi_any) - { - node->nod_arg[0]->nod_flags |= nod_deoptimize; - } - break; - case nod_ansi_all: - node->nod_flags |= nod_deoptimize; - // fall into - - case nod_ansi_any: - if (node->nod_flags & nod_deoptimize) { - // Deoptimize the conjunct, not the ANY/ALL node itself + // Deoptimize the conjunct, not the ALL node itself jrd_nod* boolean = ((RecordSelExpr*) (node->nod_arg[e_any_rse]))->rse_boolean; fb_assert(boolean); @@ -3524,13 +3511,13 @@ boolean = boolean->nod_arg[1]; } // Deoptimize the injected boolean of a quantified predicate - // when it's necessary. Neither ALL nor NOT ANY requires an index scan. - // This fixes bugs SF #459059 and #543106. + // when it's necessary. ALL predicate does not require an index scan. + // This fixes bug SF #543106. boolean->nod_flags |= nod_deoptimize; - node->nod_flags &= ~nod_deoptimize; } // fall into + case nod_ansi_any: case nod_any: case nod_exists: case nod_unique: Index: rse.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/jrd/rse.cpp,v retrieving revision 1.100 retrieving revision 1.101 diff -b -U3 -r1.100 -r1.101 --- rse.cpp 10 Feb 2006 03:35:37 -0000 1.100 +++ rse.cpp 15 Feb 2006 13:34:35 -0000 1.101 @@ -1949,6 +1949,11 @@ { select_node = NULL; } + + EVL_expr(tdbb, column_node->nod_arg[0]); + if (request->req_flags & req_null) { + return false; + } } if (column_node && (request->req_flags & req_ansi_any)) { |