summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-27 07:15:07 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-27 07:15:07 +0300
commit72f671ab7b57ccd0fb0ed2d944081c8be894dac8 (patch)
tree46acfc2128e85d52ffabbf3bff0acf291c7aa8b9 /sql/sql_class.h
parent08de2540acc6a9e1aa24f26a18ac467ffc8284fd (diff)
parent1f4ee3fa5a80e9715b0dc77b72fabb95a4045745 (diff)
downloadmariadb-git-72f671ab7b57ccd0fb0ed2d944081c8be894dac8.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index f6434605a74..3cae7d460e0 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -7095,11 +7095,12 @@ void dbug_serve_apcs(THD *thd, int n_calls);
class ScopedStatementReplication
{
public:
- ScopedStatementReplication(THD *thd) : thd(thd)
- {
- if (thd)
- saved_binlog_format= thd->set_current_stmt_binlog_format_stmt();
- }
+ ScopedStatementReplication(THD *thd) :
+ saved_binlog_format(thd
+ ? thd->set_current_stmt_binlog_format_stmt()
+ : BINLOG_FORMAT_MIXED),
+ thd(thd)
+ {}
~ScopedStatementReplication()
{
if (thd)
@@ -7107,8 +7108,8 @@ public:
}
private:
- enum_binlog_format saved_binlog_format;
- THD *thd;
+ const enum_binlog_format saved_binlog_format;
+ THD *const thd;
};