From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- .../suite/storage_engine/index_primary.result | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 mysql-test/suite/storage_engine/index_primary.result (limited to 'mysql-test/suite/storage_engine/index_primary.result') diff --git a/mysql-test/suite/storage_engine/index_primary.result b/mysql-test/suite/storage_engine/index_primary.result new file mode 100644 index 00000000..04b114f3 --- /dev/null +++ b/mysql-test/suite/storage_engine/index_primary.result @@ -0,0 +1,53 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a PRIMARY KEY, +b +) ENGINE= ; +SHOW KEYS IN t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 0 PRIMARY 1 a # # NULL NULL # # +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +INSERT INTO t1 (a,b) VALUES (1,'c'); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +# If you got a difference in error message, just add it to rdiff file +DROP TABLE t1; +CREATE TABLE t1 (a PRIMARY KEY, +b PRIMARY KEY +) ENGINE= ; +ERROR 42000: Multiple primary key defined +CREATE TABLE t1 (a , +b , +PRIMARY KEY (a,b) +) ENGINE= ; +SHOW INDEX IN t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 0 PRIMARY 1 a # # NULL NULL # # +t1 0 PRIMARY 2 b # # NULL NULL # # +INSERT INTO t1 (a,b) VALUES (1,'a'),(1,'b'),(2,'a'),(2,'b'); +INSERT INTO t1 (a,b) VALUES (1,'b'); +ERROR 23000: Duplicate entry '1-b' for key 'PRIMARY' +# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +# If you got a difference in error message, just add it to rdiff file +DROP TABLE t1; +CREATE TABLE t1 (a KEY, +b , + (b) +) ENGINE= ; +SHOW INDEX IN t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 0 PRIMARY 1 a # # NULL NULL # # +t1 1 b 1 b # # NULL NULL # # +DROP TABLE t1; +CREATE TABLE t1 (a , +b PRIMARY KEY +) ENGINE= ; +SHOW INDEX IN t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 0 PRIMARY 1 b # # NULL NULL # # +ALTER TABLE t1 DROP INDEX `PRIMARY`; +ALTER TABLE t1 ADD CONSTRAINT PRIMARY KEY pk (a); +SHOW KEYS IN t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 0 PRIMARY 1 a # # NULL NULL # # +ALTER TABLE t1 DROP PRIMARY KEY; +DROP TABLE t1; -- cgit v1.2.3