summaryrefslogtreecommitdiff
path: root/mysql-test/t/alter_table.test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2013-11-11 18:23:53 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2013-11-11 18:23:53 +0400
commit3cf7e283a6004385b6f2e116b933299d9701fac7 (patch)
treeb55e5c2639e5134296d5d2873203478eadf9727d /mysql-test/t/alter_table.test
parent07d3fc52208b6c680aaec3db65a756824d535719 (diff)
downloadmariadb-git-3cf7e283a6004385b6f2e116b933299d9701fac7.tar.gz
MDEV-4435 Server crashes in my_strcasecmp_utf8 on ADD KEY IF NOT EXISTS with implicit name when the key exists.
Use field name as a key name if the key name wasn't specified.
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r--mysql-test/t/alter_table.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index f40f8c11fac..b0b017f2b70 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -1634,3 +1634,12 @@ DROP TABLE ti3;
CREATE TABLE tm1(i INT DEFAULT 1) engine=MyISAM;
ALTER TABLE tm1 ADD INDEX ii1(i), ALTER COLUMN i DROP DEFAULT;
DROP TABLE tm1;
+
+#
+# MDEV-4435 Server crashes in my_strcasecmp_utf8 on ADD KEY IF NOT EXISTS with implicit name when the key exists.
+#
+create table if not exists t1 (i int);
+alter table t1 add key (i);
+alter table t1 add key if not exists (i);
+DROP TABLE t1;
+