Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4d1e3671
Commit
4d1e3671
authored
Oct 10, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-29741 SHOW BINLOG EVENTS shows garbage with system_versioning_insert_history=on
parent
a858ff17
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
mysql-test/suite/versioning/r/binlog.result
mysql-test/suite/versioning/r/binlog.result
+18
-0
mysql-test/suite/versioning/t/binlog.test
mysql-test/suite/versioning/t/binlog.test
+13
-0
sql/log_event_server.cc
sql/log_event_server.cc
+2
-0
No files found.
mysql-test/suite/versioning/r/binlog.result
0 → 100644
View file @
4d1e3671
#
# 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 */
mysql-test/suite/versioning/t/binlog.test
0 → 100644
View file @
4d1e3671
--
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
;
sql/log_event_server.cc
View file @
4d1e3671
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment