diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-10-25 17:28:25 +0400 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-10-29 18:29:02 +0200 |
commit | 6bf5a3beb377d42d14c5cc68abd3e55aa05ee2db (patch) | |
tree | 460d4e9876e46f9855e2128f5ca7896dfa624fe7 /plugin/type_uuid/mysql-test/type_uuid/type_uuid.test | |
parent | 4300f50243f0c15766d39bf848374b6d44a7ef34 (diff) | |
download | mariadb-git-6bf5a3beb377d42d14c5cc68abd3e55aa05ee2db.tar.gz |
MDEV-26785 Hyphens inside the value of uuid datatype
Diffstat (limited to 'plugin/type_uuid/mysql-test/type_uuid/type_uuid.test')
-rw-r--r-- | plugin/type_uuid/mysql-test/type_uuid/type_uuid.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test b/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test index 5f1ffc3e97c..c3c704ad29d 100644 --- a/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test +++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test @@ -1617,3 +1617,32 @@ INSERT INTO t1 VALUES (1, '00000000-0000-0000-0000-000000008888'); SELECT MIN(a), MAX(a) FROM t1 GROUP BY id; DROP TABLE t1; + + +--echo # +--echo # MDEV-26785 Hyphens inside the value of uuid datatype +--echo # + +CREATE TABLE t1 (a UUID); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('0000000000000000000000000000000'/*31 digits*/); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('000000000000000000000000000000000'/*33 digits*/); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('-00000000000000000000000000000000'/*leading hyphen*/); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 VALUES ('-00000000000000000000000000000000-'/*trailing hyphen*/); + +INSERT INTO t1 VALUES ('00000000000000000000000000000000'); +INSERT INTO t1 VALUES ('0-0000000000000000000000000000011'); +INSERT INTO t1 VALUES ('0--0000000000000000000000000000012'); +INSERT INTO t1 VALUES ('0---0000000000000000000000000000013'); +INSERT INTO t1 VALUES ('0----0000000000000000000000000000014'); +INSERT INTO t1 VALUES ('00-000000000000000000000000000021'); +INSERT INTO t1 VALUES ('00--000000000000000000000000000022'); +INSERT INTO t1 VALUES ('00---000000000000000000000000000023'); +INSERT INTO t1 VALUES ('00----000000000000000000000000000024'); + +INSERT INTO t1 VALUES ('5796dac11a1c11--------------ecab4ef859-713e4be4'); +INSERT INTO t1 VALUES ('5796dac11a1c11---------------ecab4ef859-713e4be4'); +DROP TABLE t1; |