[MDEV-20844] RBR from binary(16) to inet6 fails with error 171: The event was corrupt, leading to illegal data being read Created: 2019-10-16  Updated: 2019-10-28  Resolved: 2019-10-18

Status: Closed
Project: MariaDB Server
Component/s: Data types, Replication
Affects Version/s: 10.5
Fix Version/s: 10.5.0

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-274 The data type for IPv6/IPv4 addresses... Closed
relates to MDEV-20784 Testing for MDEV-274 (INET6, data typ... Closed

 Description   

The test case mainly represents upgrade through replication (old master => new slave), where the old master had a table with binary(16) for IPv6 values, while the new slave has inet6.

--source include/have_binlog_format_row.inc
--source include/master-slave.inc
 
create table t1 (a binary(16));
 
--sync_slave_with_master
alter table t1 modify a inet6;
 
--connection master
insert into t1 values (inet6_aton('::'));
 
--sync_slave_with_master
 
# Cleanup
--connection master
drop table t1;
--source include/rpl_end.inc

10.5 22b645ef

Last_Errno	1030
Last_Error	Could not execute Write_rows_v1 event on table test.t1; Got error 171 "The event was corrupt, leading to illegal data being read" from storage engine MyISAM, Error_code: 1030; handler error HA_ERR_CORRUPT_EVENT; the event's master log master-bin.000001, end_log_pos 655



 Comments   
Comment by Alexander Barkov [ 2019-10-16 ]

The problem happens because the master uses suffix compression for BINARY(16) and therefore removes trailing 0x00 bytes, while the slave expects exactly 16 bytes.

Field_inet6::unpack() should be extended to handle this.

Generated at Thu Feb 08 09:02:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.