Subject Re: [Firebird-Architect] ORs in Where statement
Author Helen Borrie
At 06:26 PM 12/06/2003 -0400, Ann wrote:

> >At 02:02 PM 6/12/03 -0700, Chris Meelhuysen wrote:
> > >Is Firebird constructed in such a way that when one OR condition is true
> > >that it doesn't calculate the rest since we already know it can be used?
> >
> >
> >In general, of course.
>
>It was, and now is again. In the interim, it occurred to someone
>that the evaluation of a boolean might have side-effects that
>altered the state of the database, so full evaluation was done
>even after the result was determined.

I have to confess that I've read and re-read the note in firebird.conf,
cudgelled my tiny brain, and can't come up with any scenario where
subsequent OR conditions could override a preceding True...somebody must
have thought of one, I suppose.

H.

# ----------------------------
# Boolean evaluation method (complete or shortcut)
#
# If your SQL code depends on side-effects of full evaluation of OR
# and AND statements (right-hand-side terms), even if the expressions
# final result could be determined by just examining the value of the
# first term, you might need to turn this on.
#
# Type: boolean
#
#CompleteBooleanEvaluation = 0


# ----------------------------