[MDEV-26785] Hyphens inside the value of uuid datatype Created: 2021-10-07  Updated: 2021-10-29  Resolved: 2021-10-25

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: None
Fix Version/s: 10.7.1

Type: Bug Priority: Critical
Reporter: Alice Sherepa Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-4958 Adding datatype UUID Closed

 Description   

It is allowed to set hyphens in groups of 2 digits or ommit them, so there are max 15 hyphens in the uuid.
But it is also allowed to set them in a row - and it does not make much sense and is not very clear when 15 of them are accepted, while 16 is not - it is confusing.

create table t1 (a uuid);
 
MariaDB [test]> INSERT INTO t1 VALUES ('5796dac11a1c11--------------ecab4ef859-713e4be4');
Query OK, 1 row affected (0.026 sec)
 
MariaDB [test]> INSERT INTO t1 VALUES ('5796dac11a1c11---------------ecab4ef859-713e4be4');
ERROR 1292 (22007): Incorrect uuid value: '5796dac11a1c11---------------ecab4ef859-713e4be4' for column `test`.`t1`.`a` at row 1


Generated at Thu Feb 08 09:47:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.