summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-06-18 11:49:07 +0300
committerMonty <monty@mariadb.org>2020-06-19 12:03:13 +0300
commit00bd52b14722737b3e8d22dc8c3fcbeeab8efeef (patch)
tree5130d0a83ca2c92506614d3b0e0a4da7b439a42a /sql/sql_insert.cc
parent1a49c5eb4d11dd6a35d293856281239d8e459582 (diff)
downloadmariadb-git-00bd52b14722737b3e8d22dc8c3fcbeeab8efeef.tar.gz
Added THD::binlog_table_should_be_logged() to simplify some code
- Added missing test for binlog_filter to ALTER TABLE
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 1576a28f43a..48baabd8803 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -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 ");