| 1 |
--source include/have_partition.inc |
| 2 |
--let $engine=MyISAM |
| 3 |
--source inc/part_alter_values.inc |
| 4 |
|
| 5 |
# |
| 6 |
# MDEV-14026 ALTER TABLE ... DELAY_KEY_WRITE=1 creates table copy for partitioned MyISAM table with DATA DIRECTORY/INDEX DIRECTORY options |
| 7 |
# |
| 8 |
|
| 9 |
replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR; |
| 10 |
--disable_warnings |
| 11 |
eval create table t1 ( c1 int, c2 int, c3 varchar(100)) delay_key_write=1 |
| 12 |
partition by key(c1) ( |
| 13 |
partition p01 data directory = '$MYSQL_TMP_DIR' |
| 14 |
index directory = '$MYSQL_TMP_DIR', |
| 15 |
partition p02 data directory = '$MYSQL_TMP_DIR' |
| 16 |
index directory = '$MYSQL_TMP_DIR'); |
| 17 |
--enable_warnings |
| 18 |
insert into t1 values (1, 1, repeat('a', 100)); |
| 19 |
insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1; |
| 20 |
insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1; |
| 21 |
insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1; |
| 22 |
alter online table t1 delay_key_write=0; |
| 23 |
alter online table t1 delay_key_write=1; |
| 24 |
drop table t1; |
| 25 |
|
| 26 |
--echo # |
| 27 |
--echo # MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS |
| 28 |
--echo # |
| 29 |
create table t1 (i1 int primary key, i2 int, d1 date, key(i2)) |
| 30 |
partition by hash(i1) partitions 3; |
| 31 |
insert into t1 values(0, 1, '2010-10-10'); |
| 32 |
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; |
| 33 |
alter table t1 disable keys; |
| 34 |
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; |
| 35 |
alter table t1 add partition (partition p4); |
| 36 |
select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1'; |
| 37 |
drop table t1; |
| 38 |
|
| 39 |
--echo # End of 10.11 tests |