Commit 4d1e3671 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-29741 SHOW BINLOG EVENTS shows garbage with system_versioning_insert_history=on

parent a858ff17
#
# MDEV-29741 SHOW BINLOG EVENTS shows garbage with system_versioning_insert_history=on
#
reset master;
create table t (a int) with system versioning;
set system_versioning_insert_history= on;
insert into t (a) values (1);
set system_versioning_insert_history= off;
drop table t;
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 t (a int) with system versioning
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; set @@system_versioning_insert_history=1; insert into t (a) values (1)
master-bin.000001 # Query # # set @@system_versioning_insert_history=1; COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t` /* generated by server */
--source include/have_log_bin.inc
--echo #
--echo # MDEV-29741 SHOW BINLOG EVENTS shows garbage with system_versioning_insert_history=on
--echo #
reset master;
create table t (a int) with system versioning;
set system_versioning_insert_history= on;
insert into t (a) values (1);
set system_versioning_insert_history= off;
drop table t;
source include/show_binlog_events.inc;
......@@ -1056,6 +1056,8 @@ void Query_log_event::pack_info(Protocol *protocol)
buf.append(STRING_WITH_LEN("check_constraint_checks=1, "));
if (flags2 & OPTION_IF_EXISTS)
buf.append(STRING_WITH_LEN("@@sql_if_exists=1, "));
if (flags2 & OPTION_INSERT_HISTORY)
buf.append(STRING_WITH_LEN("@@system_versioning_insert_history=1, "));
buf[buf.length()-2]=';';
}
if (query && q_len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment