Incompatible with MySQL when using expressions returning enum as WHERE conditions #23114
Labels
affects-4.0
This bug affects 4.0.x versions.
affects-5.0
This bug affects 5.0.x versions.
component/expression
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
MySQL 8.0.22
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
5. Root cause analysis
The eval type of
if(e>1, e, e)
is evaluated asETString
. Enum value 'a' as string becomes0
when converting to int.Maybe we should consider adding Enum/Set as separate eval types.
Related RFC: https://github.com/tikv/rfcs/pull/57/files
The text was updated successfully, but these errors were encountered: