1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Added THD::binlog_table_should_be_logged() to simplify some code

- Added missing test for binlog_filter to ALTER TABLE
This commit is contained in:
Monty
2020-06-18 11:49:07 +03:00
parent 1a49c5eb4d
commit 00bd52b147
4 changed files with 21 additions and 15 deletions

View File

@ -4802,10 +4802,7 @@ bool binlog_create_table(THD *thd, TABLE *table)
if (thd->variables.binlog_format == BINLOG_FORMAT_ROW &&
table->s->tmp_table)
return 0;
if (!mysql_bin_log.is_open() ||
!(thd->variables.option_bits & OPTION_BIN_LOG) ||
(thd->wsrep_binlog_format() == BINLOG_FORMAT_STMT &&
!binlog_filter->db_ok(table->s->db.str)))
if (!thd->binlog_table_should_be_logged(&table->s->db))
return 0;
/*
@ -4834,10 +4831,7 @@ bool binlog_drop_table(THD *thd, TABLE *table)
/* Don't log temporary tables in row format */
if (!table->s->table_creation_was_logged)
return 0;
if (!mysql_bin_log.is_open() ||
!(thd->variables.option_bits & OPTION_BIN_LOG) ||
(thd->wsrep_binlog_format() == BINLOG_FORMAT_STMT &&
!binlog_filter->db_ok(table->s->db.str)))
if (!thd->binlog_table_should_be_logged(&table->s->db))
return 0;
query.append("DROP ");