Skip to content

Commit

Permalink
test for Bug #16051817 GOT ERROR 124 FROM STORAGE ENGINE ON DELETE FR…
Browse files Browse the repository at this point in the history
…OM A PARTITIONED TABLE

followup for c589638
  • Loading branch information
vuvova committed May 5, 2024
1 parent 3d75cff commit 4045a87
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
21 changes: 21 additions & 0 deletions mysql-test/suite/parts/r/alter_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,25 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
ERROR 42000: Can't open table
DROP VIEW v1;
DROP TABLE t1, t2;
#
# MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS
#
create table t1 (i1 int primary key, i2 int, d1 date, key(i2))
partition by hash(i1) partitions 3;
insert into t1 values(0, 1, '2010-10-10');
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
index_name comment
PRIMARY
i2
alter table t1 disable keys;
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
index_name comment
PRIMARY
i2 disabled
alter table t1 add partition (partition p4);
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
index_name comment
PRIMARY
i2 disabled
drop table t1;
# End of 10.5 tests
13 changes: 13 additions & 0 deletions mysql-test/suite/parts/t/alter_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,17 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
DROP VIEW v1;
DROP TABLE t1, t2;

--echo #
--echo # MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS
--echo #
create table t1 (i1 int primary key, i2 int, d1 date, key(i2))
partition by hash(i1) partitions 3;
insert into t1 values(0, 1, '2010-10-10');
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
alter table t1 disable keys;
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
alter table t1 add partition (partition p4);
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
drop table t1;

--echo # End of 10.5 tests

0 comments on commit 4045a87

Please sign in to comment.