Debian Codegraph @

mysql-test/suite/engines/funcs/r/in_string_pk_constraint_error.result

raw
1 DROP TABLE IF EXISTS t1;
2 CREATE TABLE t1(c1 CHAR(10) NOT NULL PRIMARY KEY);
3 INSERT INTO t1 (c1) VALUES('abc');
4 INSERT INTO t1 (c1) VALUES('def');
5 INSERT INTO t1 (c1) VALUES('abc');
6 ERROR 23000: Duplicate entry 'abc' for key 't1.PRIMARY'
7 SELECT * FROM t1;
8 c1
9 abc
10 def
11 DROP TABLE t1;
12 CREATE TABLE t1(c1 VARCHAR(10) NOT NULL PRIMARY KEY);
13 INSERT INTO t1 (c1) VALUES('abc');
14 INSERT INTO t1 (c1) VALUES('def');
15 INSERT INTO t1 (c1) VALUES('abc');
16 ERROR 23000: Duplicate entry 'abc' for key 't1.PRIMARY'
17 SELECT * FROM t1;
18 c1
19 abc
20 def
21 DROP TABLE t1;
22 CREATE TABLE t1(c1 BINARY(10) NOT NULL PRIMARY KEY);
23 INSERT INTO t1 (c1) VALUES('abc');
24 INSERT INTO t1 (c1) VALUES('def');
25 INSERT INTO t1 (c1) VALUES('abc');
26 ERROR 23000: Duplicate entry 'abc' for key 't1.PRIMARY'
27 SELECT * FROM t1;
28 c1
29 abc
30 def
31 DROP TABLE t1;
32 CREATE TABLE t1(c1 VARBINARY(10) NOT NULL PRIMARY KEY);
33 INSERT INTO t1 (c1) VALUES('abc');
34 INSERT INTO t1 (c1) VALUES('def');
35 INSERT INTO t1 (c1) VALUES('abc');
36 ERROR 23000: Duplicate entry 'abc' for key 't1.PRIMARY'
37 SELECT * FROM t1;
38 c1
39 abc
40 def
41 DROP TABLE t1;