summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/binlog/r/foreign_key.result
blob: 171018f22be7852933eb3d3071c58e7ac845776c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
reset master;
CREATE TABLE t1 (
id INT,
k INT,
c CHAR(8),
KEY (k),
PRIMARY KEY (id),
FOREIGN KEY (id) REFERENCES t1 (k)
) ENGINE=InnoDB;
LOCK TABLES t1 WRITE;
SET SESSION FOREIGN_KEY_CHECKS= OFF;
SET AUTOCOMMIT=OFF;
INSERT INTO t1 VALUES (1,1,'foo');
DROP TABLE t1;
SET SESSION FOREIGN_KEY_CHECKS= ON;
SET AUTOCOMMIT=ON;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (
id INT,
k INT,
c CHAR(8),
KEY (k),
PRIMARY KEY (id),
FOREIGN KEY (id) REFERENCES t1 (k)
) ENGINE=InnoDB
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Annotate_rows	#	#	INSERT INTO t1 VALUES (1,1,'foo')
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
master-bin.000001	#	Write_rows_v1	#	#	table_id: # flags: STMT_END_F
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; set foreign_key_checks=1; DROP TABLE `t1` /* generated by server */