summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index bf126fb09e4..d546494e6a9 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -560,6 +560,10 @@ static sys_var_const sys_skip_show_database(&vars, "skip_show_database",
OPT_GLOBAL, SHOW_BOOL,
(uchar*) &opt_skip_show_db);
+static sys_var_const sys_skip_name_resolve(&vars, "skip_name_resolve",
+ OPT_GLOBAL, SHOW_BOOL,
+ (uchar*) &opt_skip_name_resolve);
+
static sys_var_const sys_socket(&vars, "socket",
OPT_GLOBAL, SHOW_CHAR_PTR,
(uchar*) &mysqld_unix_port);
@@ -3179,6 +3183,13 @@ static bool set_option_autocommit(THD *thd, set_var *var)
if ((org_options & OPTION_NOT_AUTOCOMMIT))
{
/* We changed to auto_commit mode */
+ if (thd->transaction.xid_state.xa_state != XA_NOTR)
+ {
+ thd->options= org_options;
+ my_error(ER_XAER_RMFAIL, MYF(0),
+ xa_state_names[thd->transaction.xid_state.xa_state]);
+ return 1;
+ }
thd->options&= ~(ulonglong) (OPTION_BEGIN | OPTION_KEEP_LOG);
thd->transaction.all.modified_non_trans_table= FALSE;
thd->server_status|= SERVER_STATUS_AUTOCOMMIT;