diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/storage_engine/index_primary.result | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/storage_engine/index_primary.result')
-rw-r--r-- | mysql-test/suite/storage_engine/index_primary.result | 53 |
1 files changed, 53 insertions, 0 deletions
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 <INT_COLUMN> PRIMARY KEY, +b <CHAR_COLUMN> +) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +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 <INT_COLUMN> PRIMARY KEY, +b <CHAR_COLUMN> PRIMARY KEY +) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +ERROR 42000: Multiple primary key defined +CREATE TABLE t1 (a <INT_COLUMN>, +b <CHAR_COLUMN>, +PRIMARY KEY (a,b) +) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +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 <INT_COLUMN> KEY, +b <CHAR_COLUMN>, +<CUSTOM_INDEX> (b) +) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +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 <INT_COLUMN>, +b <CHAR_COLUMN> PRIMARY KEY +) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +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; |