diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-11-19 15:52:14 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-11-19 15:52:14 +0100 |
commit | beded7d9c9592ca8fdfc367f7c64f89c35995c44 (patch) | |
tree | a215a54ed5043bb17fe7d69a69439e05b21682d5 /mysql-test/t/alter_table.test | |
parent | af71da5d2f90c82b2357e808640003907c488bc2 (diff) | |
parent | 2553f143fdeb9068eb02a8fda58750c24071f5ef (diff) | |
download | mariadb-git-beded7d9c9592ca8fdfc367f7c64f89c35995c44.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r-- | mysql-test/t/alter_table.test | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index bce7f3f95bb..df4958bd2bc 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1700,6 +1700,18 @@ alter table t1 add unique index if not exists idx(i); show create table t1; DROP TABLE t1; +# +# MDEV-8358 ADD PRIMARY KEY IF NOT EXISTS -> ERROR 1068 (42000): Multiple primary key +# + +CREATE TABLE t1 ( + `event_id` bigint(20) unsigned NOT NULL DEFAULT '0', + `market_id` bigint(20) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`event_id`,`market_id`) + ); +ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS event_id (event_id,market_id); +DROP TABLE t1; + --echo # --echo # MDEV-7374 : Losing connection to MySQL while running ALTER TABLE --echo # @@ -1722,6 +1734,3 @@ ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2'; SHOW CREATE TABLE t1; DROP TABLE t1; ---echo # ---echo # Start of 10.1 tests ---echo # |