[MDEV-23473] Query_log_event::pack_info does not check flags2_inited Created: 2020-08-13  Updated: 2023-11-27  Resolved: 2020-09-07

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.5
Fix Version/s: 10.5.7

Type: Bug Priority: Major
Reporter: Andrei Elkin Assignee: Andrei Elkin
Resolution: Fixed Votes: 0
Labels: None


 Description   

Recent MDEV-19964 patch did not check flags2_inited before
to access flags2 itself.
The latter may be randomly non-zero (see Query_log_event constructor) which
eventulizes on rpl.rpl_mariadb_slave_capability with the following mismatch pattern:

-slave-relay-bin.000005	#	Query	#	#	BEGIN
+slave-relay-bin.000005	#	Query	#	#	set foreign_key_checks=1, check_constraint_checks=1; BEGIN

where the '+' extra is cause by the random flags2.

The case should be fixed with following the pattern of first checking flags2_inited.



 Comments   
Comment by Andrei Elkin [ 2020-08-13 ]

Sachin, howdy.

Could you please access the patch.

Cheers,

Andrei

Comment by Andrei Elkin [ 2020-09-07 ]

Closing after discussion with the reviewer and approved decision to convert the original extra check
into an assert. As result no redundancy check in runtime but still (dbug) guarded relation between from object is ensured.

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