Commit 92ffab38 authored by Andrei Elkin's avatar Andrei Elkin

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 {{80544a58}}, 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}}.
parent 30ff6164
......@@ -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 |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment