diff --git a/sql/sql_class.h b/sql/sql_class.h index 502ac3d2259..04d8ec11e5b 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1572,8 +1572,11 @@ public: or trigger is decided when it starts executing, depending for example on the caller (for a stored function: if caller is SELECT or INSERT/UPDATE/DELETE...). + + Don't reset binlog format for NDB binlog injector thread. */ - if ((temporary_tables == NULL) && (in_sub_stmt == 0)) + if ((temporary_tables == NULL) && (in_sub_stmt == 0) && + (system_thread != SYSTEM_THREAD_NDBCLUSTER_BINLOG)) { current_stmt_binlog_row_based= test(variables.binlog_format == BINLOG_FORMAT_ROW);