mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
cleanup: simplify the usage of WSREP_FORMAT macro
This commit is contained in:
@ -3557,8 +3557,7 @@ thr_lock_type read_lock_type_for_table(THD *thd,
|
||||
at THD::variables::sql_log_bin member.
|
||||
*/
|
||||
bool log_on= mysql_bin_log.is_open() && thd->variables.sql_log_bin;
|
||||
ulong binlog_format= thd->variables.binlog_format;
|
||||
if ((log_on == FALSE) || (WSREP_FORMAT((enum enum_binlog_format) binlog_format) == BINLOG_FORMAT_ROW) ||
|
||||
if ((log_on == FALSE) || (thd->wsrep_binlog_format() == BINLOG_FORMAT_ROW) ||
|
||||
(table_list->table->s->table_category == TABLE_CATEGORY_LOG) ||
|
||||
(table_list->table->s->table_category == TABLE_CATEGORY_PERFORMANCE) ||
|
||||
!(is_update_query(prelocking_ctx->sql_command) ||
|
||||
@ -5327,7 +5326,7 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count,
|
||||
We can solve these problems in mixed mode by switching to binlogging
|
||||
if at least one updated table is used by sub-statement
|
||||
*/
|
||||
if (WSREP_FORMAT((enum enum_binlog_format) thd->variables.binlog_format) != BINLOG_FORMAT_ROW && tables &&
|
||||
if (thd->wsrep_binlog_format() != BINLOG_FORMAT_ROW && tables &&
|
||||
has_write_table_with_auto_increment(thd->lex->first_not_own_table()))
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user