| 1 |
--echo # |
| 2 |
--echo # Bug #31529221 ALTER TABLE FAILS AND REPORTS INCORRECT KEY FILE FOR TABLE T1 |
| 3 |
--echo # |
| 4 |
|
| 5 |
--source include/have_innodb_16k.inc |
| 6 |
--source include/have_debug.inc |
| 7 |
--source include/have_debug_sync.inc |
| 8 |
--source include/big_test.inc |
| 9 |
|
| 10 |
SET @old_innodb_online_alter_log_max_size := @@innodb_online_alter_log_max_size; |
| 11 |
SET @old_max_allowed_packet := @@max_allowed_packet; |
| 12 |
set global innodb_online_alter_log_max_size=1342177280000; |
| 13 |
set global max_allowed_packet=1024*1024*1024; |
| 14 |
|
| 15 |
create table t1(d1 longblob); |
| 16 |
|
| 17 |
--connect (con1,localhost,root,,test,,) |
| 18 |
insert into t1(d1) values (repeat(UNHEX('000f'), 1022*1022*88)); |
| 19 |
SET DEBUG_SYNC= 'alter_table_inplace_after_lock_downgrade SIGNAL proceed_insert WAIT_FOR proceed_alter'; |
| 20 |
--send alter table t1 ADD COLUMN `d2` char(128) not null default '0' after d1; |
| 21 |
|
| 22 |
--connect (con2,localhost,root,,test,,) |
| 23 |
SET DEBUG_SYNC= 'now WAIT_FOR proceed_insert'; |
| 24 |
|
| 25 |
#insert sufficient records so that the operation gets logged in the temporary file |
| 26 |
--disable_query_log |
| 27 |
let $c=3241; |
| 28 |
while($c) { |
| 29 |
insert into t1(d1) values (repeat(UNHEX('000f'), 1022*3)); |
| 30 |
dec $c; |
| 31 |
} |
| 32 |
--enable_query_log |
| 33 |
SET DEBUG_SYNC= 'now SIGNAL proceed_alter'; |
| 34 |
|
| 35 |
--connection con1 |
| 36 |
--reap |
| 37 |
|
| 38 |
--connection default |
| 39 |
disconnect con1; |
| 40 |
disconnect con2; |
| 41 |
SET DEBUG_SYNC= 'RESET'; |
| 42 |
drop table t1; |
| 43 |
SET GLOBAL innodb_online_alter_log_max_size = @old_innodb_online_alter_log_max_size; |
| 44 |
set global max_allowed_packet = @old_max_allowed_packet; |
| 45 |
|