[MDEV-6092] Weird hex warnings Created: 2014-04-14 Updated: 2018-01-09 Resolved: 2014-04-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.37, 10.0.10 |
| Fix Version/s: | 5.5.38, 10.0.11 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Federico Razzoli | Assignee: | Ian Gilfillan |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The first syntax is ok, the latter 2 issue warnings:
But based on MySQL docs, these syntaxes should be equivalent: Sorry, I didn't try this on MySQL or on older Maria versions. |
| Comments |
| Comment by Elena Stepanova [ 2014-04-14 ] |
|
Not reproducible on 5.1-5.3, MySQL 5.5 / 5.6. It might be the same as MDEV-5770 or related to it. |
| Comment by Alexander Barkov [ 2014-04-24 ] |
|
This is not a bug. 0xHHHH is a MySQL/MariaDB extension. It can work as a number or as a string depending on context. X'HHHH' is a standard SQL syntax for binary string literals. The change was done:
So now "CAST(0xHHHH AS UNSIGNED)" and "CAST(0x'HHHH' AS UNSIGNED)" work differently.
In the reported example:
Ian, please consider documenting this difference in |
| Comment by Ian Gilfillan [ 2014-04-24 ] |
|
This has now been documented at https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/ and https://mariadb.com/kb/en/cast/ |