summaryrefslogtreecommitdiff
path: root/mysql-test/t/alter_table.test
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2005-01-18 17:45:49 +0300
committerunknown <dlenev@brandersnatch.localdomain>2005-01-18 17:45:49 +0300
commite2c869f2ff92b72917ecb4d16cf9408be174eb71 (patch)
treeb09d56eaf7f2505f10962f7a4b9f1d4e0bda8f8b /mysql-test/t/alter_table.test
parent9474fed704746c18d3422cf16ecd6a4747392cb1 (diff)
downloadmariadb-git-e2c869f2ff92b72917ecb4d16cf9408be174eb71.tar.gz
Added test for bug #7884 "Able to add invalid unique index on TIMESTAMP
prefix", which roots were fixed in 4.0 tree. mysql-test/r/alter_table.result: Added test for bug #7884 "Able to add invalid unique index on TIMESTAMP prefix". mysql-test/t/alter_table.test: Added test for bug #7884 "Able to add invalid unique index on TIMESTAMP prefix".
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r--mysql-test/t/alter_table.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index 66a4adc90fe..c2277dc1755 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -336,3 +336,14 @@ select hex(a) from t1;
alter table t1 convert to character set cp1251;
select hex(a) from t1;
drop table t1;
+
+#
+# Test for bug #7884 "Able to add invalid unique index on TIMESTAMP prefix"
+# MySQL should not think that packed field with non-zero decimals is
+# geometry field and allow to create prefix index which is
+# shorter than packed field length.
+#
+create table t1 ( a timestamp );
+--error 1089
+alter table t1 add unique ( a(1) );
+drop table t1;