summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index dfe17fe5779..b090f35a607 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -3192,6 +3192,11 @@ extern "C" bool thd_binlog_filter_ok(const MYSQL_THD thd)
{
return binlog_filter->db_ok(thd->db);
}
+
+extern "C" bool thd_sqlcom_can_generate_row_events(const MYSQL_THD thd)
+{
+ return sqlcom_can_generate_row_events(thd);
+}
#endif // INNODB_COMPATIBILITY_HOOKS */
/****************************************************************************
@@ -3917,7 +3922,8 @@ int THD::decide_logging_format(TABLE_LIST *tables)
*/
my_error((error= ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE), MYF(0));
}
- else if (variables.binlog_format == BINLOG_FORMAT_ROW)
+ else if (variables.binlog_format == BINLOG_FORMAT_ROW &&
+ sqlcom_can_generate_row_events(this))
{
/*
2. Error: Cannot modify table that uses a storage engine
@@ -3955,7 +3961,8 @@ int THD::decide_logging_format(TABLE_LIST *tables)
*/
my_error((error= ER_BINLOG_ROW_INJECTION_AND_STMT_MODE), MYF(0));
}
- else if ((flags_write_all_set & HA_BINLOG_STMT_CAPABLE) == 0)
+ else if ((flags_write_all_set & HA_BINLOG_STMT_CAPABLE) == 0 &&
+ sqlcom_can_generate_row_events(this))
{
/*
5. Error: Cannot modify table that uses a storage engine