summaryrefslogtreecommitdiff
path: root/mysql-test/t/alter_table.test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-03-12 17:08:42 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2007-03-12 17:08:42 +0200
commitd92106135d19e6d7f3031546e9778b3bbba1ea42 (patch)
tree586b19888087cca17d4238751e68fee88c0e0c0e /mysql-test/t/alter_table.test
parent4ce3624ec48d16256b434c31324a8593b1c1c7e4 (diff)
parentbd6aecf3f3c2cab2108cc0f75defea6cf17b97c9 (diff)
downloadmariadb-git-d92106135d19e6d7f3031546e9778b3bbba1ea42.tar.gz
Merge magare.gmz:/home/kgeorge/mysql/work/B26794-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B26794-5.1-opt mysql-test/r/gis-rtree.result: Auto merged sql/field.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged mysql-test/r/alter_table.result: tests merge mysql-test/t/alter_table.test: tests merge
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r--mysql-test/t/alter_table.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index 297813dfead..5844119ac92 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -642,6 +642,29 @@ alter table t1 change t t text;
drop table t1;
#
+# Bug #26794: Adding an index with a prefix on a SPATIAL type breaks ALTER
+# TABLE
+#
+CREATE TABLE t1 (a varchar(500));
+
+ALTER TABLE t1 ADD b GEOMETRY NOT NULL, ADD SPATIAL INDEX(b);
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ADD KEY(b(50));
+SHOW CREATE TABLE t1;
+
+ALTER TABLE t1 ADD c POINT;
+SHOW CREATE TABLE t1;
+
+--error ER_WRONG_SUB_KEY
+CREATE TABLE t2 (a INT, KEY (a(20)));
+
+ALTER TABLE t1 ADD d INT;
+--error ER_WRONG_SUB_KEY
+ALTER TABLE t1 ADD KEY (d(20));
+
+DROP TABLE t1;
+
+#
# Bug#18038 MySQL server corrupts binary columns data
#