Skip to content
Permalink
Browse files
MDEV-23473 Query_log_event::pack_info does not check flags2_inited
A mtr failure in rpl.rpl_mariadb_slave_capability mismatch:

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

was fixed by {{80544a5}}, and without any check for {{flags_inited}}
which is a pattern in the sources.

This ticket therefore merely makes sure through an assert that a
relation between the two remain in {{Query_log_event::pack_info}}.
  • Loading branch information
andrelkin committed Sep 7, 2020
1 parent 30ff616 commit 92ffab3
Showing 1 changed file with 3 additions and 0 deletions.
@@ -1033,6 +1033,9 @@ void Query_log_event::pack_info(Protocol *protocol)
append_identifier(protocol->thd, &buf, db, db_len);
buf.append(STRING_WITH_LEN("; "));
}

DBUG_ASSERT(!flags2 || flags2_inited);

if (flags2 & (OPTION_NO_FOREIGN_KEY_CHECKS | OPTION_AUTO_IS_NULL |
OPTION_RELAXED_UNIQUE_CHECKS |
OPTION_NO_CHECK_CONSTRAINT_CHECKS |

0 comments on commit 92ffab3

Please sign in to comment.