Browse Source

galera fix: MSAN reports use-of-uninitialized-value on binlog_encryption

This commit fixes a bug in MSAN verification in debug builds
related to the member of a lex->definer structure field that may
be uninitialized for some SET statements. The bug is caused by
debug output in a wsrep-specific insert and does not affect
server functionality.
pull/3801/head
Julius Goryavsky 1 year ago
parent
commit
479a5832f0
  1. 7
      sql/log_event_server.cc
  2. 3
      sql/service_wsrep.cc

7
sql/log_event_server.cc

@ -1728,8 +1728,11 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
DBUG_PRINT("query",("%s", thd->query()));
#ifdef WITH_WSREP
WSREP_DEBUG("Query_log_event thread=%llu for query=%s",
thd_get_thread_id(thd), wsrep_thd_query(thd));
if (WSREP(thd))
{
WSREP_DEBUG("Query_log_event thread=%llu for query=%s",
thd_get_thread_id(thd), wsrep_thd_query(thd));
}
#endif
if (unlikely(!(expected_error= error_code)) ||

3
sql/service_wsrep.cc

@ -82,8 +82,7 @@ extern "C" const char *wsrep_thd_query(const THD *thd)
case SQLCOM_REVOKE:
return "REVOKE";
case SQLCOM_SET_OPTION:
if (thd->lex->definer)
return "SET PASSWORD";
return "SET OPTION";
/* fallthrough */
default:
{

Loading…
Cancel
Save