Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
None
Description
text conversion to uuid data type is based on hex characters.
binary data conversion is base on raw bytes.
The case of a 16 byte string in a text data type is unambiguous and could be converted as raw bytes rather than the failed conversion below.
MariaDB [(none)]> select cast(cast(x'00000000000000000000000000000001' as varchar(36)) as uuid);
|
+------------------------------------------------------------------------+
|
| cast(cast(x'00000000000000000000000000000001' as varchar(36)) as uuid) |
|
+------------------------------------------------------------------------+
|
| NULL |
|
+------------------------------------------------------------------------+
|
1 row in set, 1 warning (0.000 sec)
|
 |
MariaDB [(none)]> show warnings;
|
+---------+------+----------------------------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------------------------------------------------------------------------+
|
| Warning | 1292 | Incorrect uuid value: '\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0001' |
|
+---------+------+----------------------------------------------------------------------------------------------------------+
|
Attachments
Issue Links
- is caused by
-
MDEV-4958 Adding datatype UUID
- Closed