Skip to content
Permalink
Browse files
Remove warning when using ScopedStatementReplication
  • Loading branch information
montywi committed May 27, 2018
1 parent 3e03b3d commit b3a2761
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
@@ -4078,6 +4078,16 @@ class THD :public Statement,
DBUG_VOID_RETURN;
}

inline enum_binlog_format get_current_stmt_binlog_format()
{
return current_stmt_binlog_format;
}

inline void set_current_stmt_binlog_format(enum_binlog_format format)
{
current_stmt_binlog_format= format;
}

inline void set_current_stmt_binlog_format_row()
{
DBUG_ENTER("set_current_stmt_binlog_format_row");
@@ -2850,17 +2850,19 @@ bool multi_update::send_eof()
break;
}
}
ScopedStatementReplication scoped_stmt_rpl(force_stmt ? thd : NULL);
enum_binlog_format save_binlog_format;
save_binlog_format= thd->get_current_stmt_binlog_format();
if (force_stmt)
thd->set_current_stmt_binlog_format_stmt();

if (thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(),
thd->query_length(), transactional_tables, FALSE,
FALSE, errcode))
{
local_error= 1; // Rollback update
}
thd->set_current_stmt_binlog_format(save_binlog_format);
}
}
DBUG_ASSERT(trans_safe || !updated ||
DBUG_ASSERT(trans_safe || !updated ||
thd->transaction.stmt.modified_non_trans_table);

if (likely(local_error != 0))

0 comments on commit b3a2761

Please sign in to comment.