1drop table if exists t1,t2;
2create table t1(a int, unique(a));
3insert into t1 values(2);
4create table t2(a int);
5insert into t2 values(1),(2);
6reset master;
7insert into t1 select * from t2;
8ERROR 23000: Duplicate entry '2' for key 'a'
9include/show_binlog_events.inc
10Log_name	Pos	Event_type	Server_id	End_log_pos	Info
11master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
12master-bin.000001	#	Query	#	#	use `test`; insert into t1 select * from t2
13master-bin.000001	#	Query	#	#	COMMIT
14select * from t1;
15a
161
172
18drop table t1, t2;
19create table t1(a int);
20insert into t1 values(1),(1);
21reset master;
22create table t2(unique(a)) select a from t1;
23ERROR 23000: Duplicate entry '1' for key 'a'
24include/show_binlog_events.inc
25drop table t1;
26