mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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".
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user