[MDEV-14434] Wrong result for CHARSET(CONCAT(?,const)) Created: 2017-11-17 Updated: 2017-11-17 Resolved: 2017-11-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Prepared Statements |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | 10.2.11, 10.3.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This script correctly returns latin1:
If I use a similar query, but pass the number as a parameter, it erroneously returns binary:
The expected result is to return _latin1. The problem happens because Item_param does not set its DTCollation properly. These queries erroneously return 4 (DERIVATION_COERCIBLE), instead of 5 (DERIVATION_NUMERIC).
|