[
https://issues.apache.org/jira/browse/DERBY-4583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875558#action_12875558
]
Knut Anders Hatlen commented on DERBY-4583:
-------------------------------------------
The fix looks good to me, but I was a little puzzled by the update of the
master for implicitConversion.sql.
ij> values true, 'a';
1
-----
true
ERROR 22018: Invalid character string format for type BOOLEAN.
ij> values 'a', true;
1
-----
ERROR 22018: Invalid character string format for type BOOLEAN.
I would have expected that these statements had failed at compile-time, just
like this similar statement:
ij> values 'a', 1.1;
ERROR 42X61: Types 'CHAR' and 'DECIMAL' are not UNION compatible.
Do you know what causes this difference?
> TRUE by itself is not accepted in WHERE
> ---------------------------------------
>
> Key: DERBY-4583
> URL: https://issues.apache.org/jira/browse/DERBY-4583
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.3.0
> Environment: n/a
> Reporter: Wouter
> Assignee: Rick Hillegas
> Attachments: derby-4583-01-ac-booleanLiterals.diff
>
>
> A SELECT query with a literal boolean value in its WHERE clause results in a
> syntax error.
> How to reproduce:
> CREATE TABLE list (value VARCHAR(10));
> Given this table, the following queries result in a syntax error.
> SELECT * FROM list WHERE TRUE;
> SELECT * FROM list WHERE FALSE;
> SELECT * FROM list WHERE value='A' OR TRUE;
> Why is TRUE/FALSE not a boolean expression?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.