[MDEV-9886] Illegal mix of collations with a view comparing a field to a binary constant Created: 2016-04-08 Updated: 2017-10-07 Resolved: 2017-10-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.0, 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.0.33, 10.1.29, 10.2.10, 10.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This script:
correctly returns one row:
Now if I put the same SELECT into a VIEW and query it:
it returns an error:
|
| Comments |
| Comment by Alexander Barkov [ 2017-10-06 ] | |
|
The problem happens because the view query is written to the frm file as:
Notice, the hex hybrid literal 0xEE5D was replaced to a quoted character string literal, so it's misinterpreted during the view open time on SELECT. | |
| Comment by Alexander Barkov [ 2017-10-07 ] | |
|
Not repeatable in 5.5, as it uses a slightly different code in agg_item_set_converter to detect if conversion is needed: |