Browse Source

#167 test case for -100010 error when shrinking a column

pull/73/head
Rich Prohaska 12 years ago
parent
commit
9765454a9b
  1. 8
      mysql-test/suite/tokudb.bugs/r/alter_table_copy_table.result
  2. 12
      mysql-test/suite/tokudb.bugs/t/alter_table_copy_table.test

8
mysql-test/suite/tokudb.bugs/r/alter_table_copy_table.result

@ -0,0 +1,8 @@
drop table if exists t;
set tokudb_disable_hot_alter=ON;
set default_storage_engine=tokudb;
create table t (id int, x char(2), primary key (id), unique key (x));
insert into t values (1,'aa'),(2,'ab');
alter table t modify x char(1);
ERROR 23000: Duplicate entry 'a' for key 'x'
drop table t;

12
mysql-test/suite/tokudb.bugs/t/alter_table_copy_table.test

@ -0,0 +1,12 @@
# test that a uniqueness violation during an alter table operation returns a duplicate key error
source include/have_tokudb.inc;
disable_warnings;
drop table if exists t;
enable_warnings;
set tokudb_disable_hot_alter=ON;
set default_storage_engine=tokudb;
create table t (id int, x char(2), primary key (id), unique key (x));
insert into t values (1,'aa'),(2,'ab');
--error 1062
alter table t modify x char(1);
drop table t;
Loading…
Cancel
Save