[MDEV-29732] mysqlbinlog produces syntactically incorrect output with system_versioning_insert_history Created: 2022-10-06  Updated: 2022-10-26  Resolved: 2022-10-26

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients, Versioned Tables
Affects Version/s: N/A
Fix Version/s: 10.11.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-16546 System versioning setting to allow hi... Closed
Relates
relates to MDEV-29741 SHOW BINLOG EVENTS shows garbage with... Closed

 Description   

--source include/have_log_bin.inc
 
create table t (a int) with system versioning;
set system_versioning_insert_history= on;
insert into t (a) values (1);
drop table t;
 
flush binary logs;
--let $datadir=`select @@datadir`
--exec $MYSQL_BINLOG --verbose --base64-output=DECODE-ROWS $datadir/master-bin.000001 | $MYSQL test
 
# Cleanup
 
--connection master
drop table t;

bb-10.11-MDEV-16546 2b1d32429

ERROR 1064 (42000) at line 40: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
mysqltest: At line 10: exec of '<dir>/client//mysqlbinlog --defaults-file=<dir>/mysql-test/var/my.cnf --local-load=<dir>/mysql-test/var/tmp --verbose --base64-output=DECODE-ROWS <dir>/mysql-test/var/mysqld.1/data//master-bin.000001 | <dir>/client//mysql --defaults-file=<dir>/mysql-test/var/my.cnf test' failed, error: 256, status: 1, errno: 11

Line 40 is

38:#221007  2:49:13 server id 1  end_log_pos 633 CRC32 0x3f5bf80d 	Query	thread_id=5	exec_time=0	error_code=0	xid=0
39:SET TIMESTAMP=1665100153.312923/*!*/;
40:SET /*!*/;
41:insert into t (a) values (1)
42:/*!*/;
43:# at 633


Generated at Thu Feb 08 10:10:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.