1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
* changed thd_binlog_format to return configured binlog format in wsrep execution,
  regardless of binlogging setting (i.e. with or without binlogging)
* thd_binlog_format is used in innobase::write_row(), and would return confusing
  result there when log_bin==OFF
This commit is contained in:
sjaakola
2017-07-27 11:39:31 +03:00
committed by Jan Lindström
parent f3435fc37e
commit ed9f68f6ad
2 changed files with 14 additions and 3 deletions

View File

@ -4852,9 +4852,15 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd)
extern "C" int thd_binlog_format(const MYSQL_THD thd)
{
if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) &&
thd->variables.option_bits & OPTION_BIN_LOG)
return (int) thd->wsrep_binlog_format();
#ifdef WITH_WSREP
if (WSREP(thd))
{
/* for wsrep binlog format is meaningful also when binlogging is off */
return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format);
}
#endif /* WITH_WSREP */
if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG))
return (int) thd->variables.binlog_format;
else
return BINLOG_FORMAT_UNSPEC;
}