mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29741 SHOW BINLOG EVENTS shows garbage with system_versioning_insert_history=on
This commit is contained in:
18
mysql-test/suite/versioning/r/binlog.result
Normal file
18
mysql-test/suite/versioning/r/binlog.result
Normal file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# 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 */
|
13
mysql-test/suite/versioning/t/binlog.test
Normal file
13
mysql-test/suite/versioning/t/binlog.test
Normal file
@@ -0,0 +1,13 @@
|
||||
--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)
|
||||
|
Reference in New Issue
Block a user