1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

SQL: replication fixes [fixes #234]

This commit is contained in:
Eugene Kosov
2017-07-31 11:42:48 +03:00
parent 88454b3320
commit d998da0306
17 changed files with 302 additions and 128 deletions

View File

@ -6052,6 +6052,24 @@ public:
}
};
class ScopedStatementReplication
{
public:
ScopedStatementReplication(THD *thd) : thd(thd)
{
if (thd)
saved_binlog_format= thd->set_current_stmt_binlog_format_stmt();
}
~ScopedStatementReplication()
{
if (thd)
thd->restore_stmt_binlog_format(saved_binlog_format);
}
private:
enum_binlog_format saved_binlog_format;
THD *thd;
};
#endif /* MYSQL_SERVER */
#endif /* SQL_CLASS_INCLUDED */