8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 07:23:04 +01:00

Fixed the assertion reported by Vlad privately.

This commit is contained in:
dimitr 2011-02-25 10:42:00 +00:00
parent 3cb62191b5
commit a09fc3e846

View File

@ -1760,9 +1760,7 @@ BoolExprNode* RseBoolNode::pass1(thread_db* tdbb, CompilerScratch* csb)
case blr_ansi_any: case blr_ansi_any:
if (nodFlags & FLAG_DEOPTIMIZE) if (nodFlags & FLAG_DEOPTIMIZE)
{ {
nodFlags &= ~FLAG_DEOPTIMIZE; // Deoptimize the conjunct
// Deoptimize the conjunct, not the ALL node itself
BoolExprNode* boolean = rse->rse_boolean; BoolExprNode* boolean = rse->rse_boolean;
if (boolean) if (boolean)
@ -1811,7 +1809,7 @@ void RseBoolNode::pass2Boolean2(thread_db* tdbb, CompilerScratch* csb)
// the unoptimized boolean expression must be used, since the // the unoptimized boolean expression must be used, since the
// processing of these clauses is order dependant (see FilteredStream.cpp) // processing of these clauses is order dependant (see FilteredStream.cpp)
if (blrOp == blr_ansi_any || blrOp == blr_ansi_all) if ((blrOp == blr_ansi_any || blrOp == blr_ansi_all) && (nodFlags & FLAG_DEOPTIMIZE))
{ {
const bool ansiAny = blrOp == blr_ansi_any; const bool ansiAny = blrOp == blr_ansi_any;
const bool ansiNot = nodFlags & FLAG_ANSI_NOT; const bool ansiNot = nodFlags & FLAG_ANSI_NOT;