New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with some boolean expressions not being allowed [CORE4177] #4503
Comments
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @sim1984 select 1 as f Work is correct select 1 as f Work is correct select 1 as f Invalid token. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 2 [ 10560 ] |
Commented by: @pavel-zotov One more sample, fails on recent FB versions:
Output:ISQL Version: WI-T3.0.0.31733 Firebird 3.0 Beta 2
============
============ Statement failed, SQLSTATE = 42000 |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Done with caveats Test Details: Test contains temply commented code: |
Commented by: @pavel-zotov Reopened - see issue dated 27/Mar/15 01:45 PM. One more sample, now with BETWEEN operator: recreate table test1(id int, x boolean); Then: select * from test1 where x between true and true;
============ ======= select * from test1 where x between true and not false; select * from test1 where x between not false and true; select * from test1 where x between (not false) and (not false);
============ ======= But may be this is not bug and usage of parenthesis is mandatory for such cases ? |
Commented by: @asfernandes There is operator IS [NOT] {TRUE | FALSE | UNKNOWN} There is no operator IS [NOT] <expression> for IS NOT NOT ... |
Submitted by: @asfernandes
select 1
from rdb$database
where true is true
Work is correct
select 1
from rdb$database
where (1=1) and true
Work is correct
select 1
from rdb$database
where (1=1) is true
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 3, column 13.
is.
Commits: a34a77d ba923bc FirebirdSQL/fbt-repository@202a10a FirebirdSQL/fbt-repository@dce254a
====== Test Details ======
Test contains temply commented code:
--This currently FAILS. Will be uncommented later in case of post-fix for this ticket:
--select 1 x4c
--from rdb$database
--where not false and not false is not not not false;
The text was updated successfully, but these errors were encountered: