Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
5.5.37, 10.0.10
-
None
-
None
Description
The first syntax is ok, the latter 2 issue warnings:
MariaDB [(none)]> \W
|
Show warnings enabled.
|
MariaDB [(none)]> SELECT CAST(0xAA AS UNSIGNED), CAST(x'aa' AS UNSIGNED), CAST(X'aa' AS UNSIGNED); |
+------------------------+-------------------------+-------------------------+ |
| CAST(0xAA AS UNSIGNED) | CAST(x'aa' AS UNSIGNED) | CAST(X'aa' AS UNSIGNED) | |
+------------------------+-------------------------+-------------------------+ |
| 170 | 0 | 0 |
|
+------------------------+-------------------------+-------------------------+ |
1 row in set, 2 warnings (0.00 sec) |
 |
Warning (Code 1292): Truncated incorrect INTEGER value: '\xAA' |
Warning (Code 1292): Truncated incorrect INTEGER value: '\xAA' |
But based on MySQL docs, these syntaxes should be equivalent:
https://dev.mysql.com/doc/refman/5.6/en/hexadecimal-literals.html
Sorry, I didn't try this on MySQL or on older Maria versions.
Attachments
Issue Links
- relates to
-
MDEV-5770 Inconsistency between string and hex warning representation when converting from string to the other types
- Open