--source include/master-slave.inc --source include/have_innodb.inc --source include/have_binlog_format_row.inc connection master; connect(conn1,localhost,root,,); connection conn1; use test; drop table if exists t1; create table t1 (a int, b int, c int, d int, unique key idx_2(b,c)); begin; insert into t1 values(1,2,3,4); connect(conn2,localhost,root,,); connection conn2; insert into t1 values(8,3,4,4); connection conn1; commit; alter table t1 add column id bigint(20) unsigned not null auto_increment comment 'auto_increment' first, add primary key (id); select * from t1; update t1 set a=8, b=3, c=4, d=1 where id=2; select * from t1; sleep 10; connection slave; use test; select * from t1; #show slave status; connection master; use test; drop table t1;