1#
2# Bug #31529221	ALTER TABLE FAILS AND REPORTS INCORRECT KEY FILE FOR TABLE T1
3#
4SET @old_innodb_online_alter_log_max_size := @@innodb_online_alter_log_max_size;
5SET @old_max_allowed_packet := @@max_allowed_packet;
6set global innodb_online_alter_log_max_size=1342177280000;
7set global max_allowed_packet=1024*1024*1024;
8create table t1(d1 longblob);
9insert into t1(d1) values (repeat(UNHEX('000f'), 1022*1022*88));
10SET DEBUG_SYNC= 'alter_table_inplace_after_lock_downgrade SIGNAL proceed_insert WAIT_FOR proceed_alter';
11alter table t1 ADD COLUMN `d2` char(128) not null default '0' after d1;;
12SET DEBUG_SYNC= 'now WAIT_FOR proceed_insert';
13SET DEBUG_SYNC= 'now SIGNAL proceed_alter';
14SET DEBUG_SYNC= 'RESET';
15drop table t1;
16SET GLOBAL innodb_online_alter_log_max_size = @old_innodb_online_alter_log_max_size;
17set global max_allowed_packet = @old_max_allowed_packet;
18