[MDEV-8222] "string_field LIKE int_const" returns a wrong result in case of UCS2 Created: 2015-05-25 Updated: 2015-06-09 Resolved: 2015-06-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 10.1.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This script:
correctly returns one row:
If I change character set from utf8 to ucs2, it returns empty set:
The problem happens in this piece of the code:
In case of LIKE it should unconditionally call arg_arg_charsets_for_comparison(), no matter that cmp_type() of the arguments are. |