Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL)
-
None
Description
According to this page: https://mariadb.com/kb/en/mariadb/hexadecimal-literals/
The result from:
SELECT x'0a'+0;
and:
SELECT X'0a'+0;
should be equivalent of:
SELECT 0x0a+0;
However, I get 0 for the two former queries and 10 for the latter:
MariaDB [(none)]> SELECT x'0a'+0; |
+---------+ |
| x'0a'+0 | |
+---------+ |
| 0 |
|
+---------+ |
1 row in set, 1 warning (0.00 sec) |
 |
MariaDB [(none)]> show warnings;
|
+---------+------+------------------------------------------+ |
| Level | Code | Message | |
+---------+------+------------------------------------------+ |
| Warning | 1292 | Truncated incorrect DOUBLE value: '\x0A' | |
+---------+------+------------------------------------------+ |
1 row in set (0.00 sec) |
(This is also inconsistent with the results for these queries in MySQL.)