|
--source include/have_debug_sync.inc
|
|
create table t (a int);
|
insert into t values (1),(2);
|
--send set debug_sync= 'now wait_for go_dml'
|
|
--connect (con1,localhost,root,,)
|
set debug_sync='alter_table_online_progress signal go_dml wait_for go_alter';
|
--send alter table t add b int, algorithm=copy, lock=none
|
|
--connection default
|
--reap
|
insert into t values (3);
|
set debug_sync= 'now signal go_alter';
|
|
--connection con1
|
--enable_info
|
--reap
|
--disable_info
|
select * from t;
|
|
# Cleanup
|
drop table t;
|
|
bb-11.2-oalter b0484157ecd33e153e181d9ca4c055b82046ffea
|
connect con1,localhost,root,,;
|
set debug_sync='alter_table_online_progress signal go_dml wait_for go_alter';
|
alter table t add b int, algorithm=copy, lock=none;
|
connection default;
|
insert into t values (3);
|
set debug_sync= 'now signal go_alter';
|
connection con1;
|
affected rows: 2
|
info: Records: 2 Duplicates: 0 Warnings: 0
|
select * from t;
|
a b
|
1 NULL
|
2 NULL
|
3 NULL
|
So, ALTER reports 2 affected rows (the number before DML), while it obviously affects 3.
|