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

More changes related to CORE-5167.

This commit is contained in:
Adriano dos Santos Fernandes 2016-04-13 12:46:50 -03:00
parent f29f5504e0
commit 251ec1c7f5
2 changed files with 12 additions and 4 deletions

View File

@ -68,8 +68,8 @@ BOOLEAN (FB 3.0)
3. The value TRUE is greater than the value FALSE.
4. Booleans are not implicitly convertible to any other datatype. But it's convertible to/from
strings with CAST.
4. Non-booleans values are not implicitly convertible to boolean in boolean-specific expressions
like predicates and arguments for operators NOT, AND, OR and IS.
5. It's allowed to test booleans without compare with TRUE or FALSE. For example,
"field1 OR field2" and "NOT field1" are valid expressions. It's also allowed to compare with

View File

@ -6012,9 +6012,17 @@ boolean_value_expression
| '(' boolean_value_expression ')'
{ $$ = $2; }
| value IS boolean_literal
{ $$ = newNode<ComparativeBoolNode>(blr_eql, $1, $3); }
{
ComparativeBoolNode* node = newNode<ComparativeBoolNode>(blr_eql, $1, $3);
node->dsqlCheckBoolean = true;
$$ = node;
}
| value IS NOT boolean_literal
{ $$ = newNode<NotBoolNode>(newNode<ComparativeBoolNode>(blr_eql, $1, $4)); }
{
ComparativeBoolNode* node = newNode<ComparativeBoolNode>(blr_eql, $1, $4);
node->dsqlCheckBoolean = true;
$$ = newNode<NotBoolNode>(node);
}
;
%type <boolExprNode> predicate