1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
CREATE TEMPORARY TABLE t1 (a UUID, PRIMARY KEY(a)) ENGINE=MEMORY;
show create table t1;
INSERT INTO t1 VALUES (uuid());
INSERT INTO t1 VALUES (uuid());
INSERT INTO t1 VALUES (uuid());
INSERT INTO t1 VALUES (uuid());
SELECT count(a) FROM t1;
TRUNCATE t1;
SELECT count(a) FROM t1;
INSERT INTO t1 VALUES ("1b4e28ba-2fa1-11d2-883f-b9a761bde3fb");
INSERT INTO t1 VALUES ("4843cbfb-7b27-4f1b-b05d-757d1d4daaaa");
INSERT INTO t1 VALUES ("41e5daca-e4ef-4dad-a7ca-50293e89aaaa");
INSERT INTO t1 VALUES ("a2a4ab7a-968b-4353-8dcc-5ae82a07aaaa");
INSERT INTO t1 VALUES ("92b6ac44-04ad-451e-bed8-395325dfaaaa");
INSERT INTO t1 VALUES ("e3ec4f25-8bb0-4cca-8835-6ba00a1caaaa");
INSERT INTO t1 VALUES ("85b6fd2e-b384-46b3-9718-0e303a90aaaa");
INSERT INTO t1 VALUES ("d9163f3c-6228-4f62-9c21-0af56883aaaa");
--error ER_DUP_ENTRY
INSERT INTO t1 VALUES ("d9163f3c-6228-4f62-9c21-0af56883aaaa");
SELECT a FROM t1 ORDER BY a;
--error ER_INVALID_UUID_VALUE
INSERT INTO t1 VALUES ("d9163f3c-6228-4f62-9c21-0af56883");
SELECT a FROM t1 ORDER BY a;
# Test NULL insert/order
--error ER_BAD_NULL_ERROR
INSERT INTO t1 VALUES(NULL);
SELECT a FROM t1 ORDER BY a;
DROP TABLE t1;
|