[MDEV-9179] When binlog_annotate_row_events on , event of binlog file is truncated ? Created: 2015-11-24  Updated: 2023-12-05

Status: Stalled
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: sysdljr Assignee: Andrei Elkin
Resolution: Unresolved Votes: 1
Labels: None
Environment:

Cent OS 6.6, MariaDB 10.0.22



 Description   

Hi, All

set global  binlog_annotate_row_events = 1;
CREATE TABLE `test11` (`id` int(11) NOT NULL,  
`c1` int(11) DEFAULT NULL,  PRIMARY KEY (`id`)
) ENGINE=InnoDB;
 
insert into test11 values (99,10)
on duplicate key update c1= c1 + 99;
 
insert into test11 values (99,10)
on duplicate key update c1= c1 + 9;

mysqlbinlog -vv mysql-bin.000009 , below  red statement‘s length decrease one-digit than true length

....................
#151124 21:42:58 server id 5182 end_log_pos 1326 CRC32 0x4c49ef1e Annotate_rows:
#Q> insert into test11 values (99,10)
#Q> on duplicate key update c1= c1 + 9
....................
#151124 21:54:53 server id 5182 end_log_pos 1592 CRC32 0x2e42e7e6 Annotate_rows:
#Q> insert into test11 values (99,10)
#Q> on duplicate key update c1= c1 +



 Comments   
Comment by Elena Stepanova [ 2015-12-25 ]

Thanks for the report.

Apparently, it's not one symbol, it's more like "one symbol for each new line in the statement" (maybe something other than a new line can cause it too, I didn't check).

Test case

--source include/have_binlog_format_row.inc
 
set binlog_annotate_row_events = 1;
create table t1 (i int);
insert into t1 (i) 
values
(1),
(2),
(3),
(444444);
 
flush binary logs;
 
--let $datadir= `select @@datadir`
 
--exec $MYSQL_BINLOG -vv $datadir/master-bin.000001
 
drop table t1;

Annotate output

#151225 21:06:52 server id 1  end_log_pos 544 	Annotate_rows:
#Q> insert into t1 (i) 
#Q> values
#Q> (1),
#Q> (2),
#Q> (3),
#Q> (44

Comment by Andrei Elkin [ 2022-02-14 ]

alice, seeing your activity on the bug, does it really applies only 10.2 as of now?

This case may relate to a recent 10.4 support issue, so it'd be of great help if you could you try reproducing it on that version too (take angelique.sklavounos for training)?

Comment by Julien Fritsch [ 2023-12-05 ]

Automated message:
----------------------------
Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.

Generated at Thu Feb 08 07:32:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.