summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-05-29 17:34:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-05-29 17:34:49 +0300
commita3539bbb2ac51dfa2b363d3b4c11784c25d1f256 (patch)
tree6b49da1f15e5740adaf5da1c4179760a15b77dc4 /sql/sql_admin.cc
parentc98e6d4b3d4d17ee429c696ac07e0bc4bbe1a81e (diff)
parent6f96ff7268dd20d6d3b61931c972e7a43c1efdff (diff)
downloadmariadb-git-a3539bbb2ac51dfa2b363d3b4c11784c25d1f256.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index f2523b44317..21bb086f013 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -430,7 +430,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
HA_CHECK_OPT* check_opt,
const char *operator_name,
thr_lock_type lock_type,
- bool open_for_modify,
+ bool org_open_for_modify,
bool repair_table_use_frm,
uint extra_open_options,
int (*prepare_func)(THD *, TABLE_LIST *,
@@ -497,6 +497,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
bool fatal_error=0;
bool open_error;
bool collect_eis= FALSE;
+ bool open_for_modify= org_open_for_modify;
DBUG_PRINT("admin", ("table: '%s'.'%s'", db, table->table_name.str));
strxmov(table_name, db, ".", table->table_name.str, NullS);
@@ -1164,7 +1165,7 @@ send_result_message:
}
}
/* Error path, a admin command failed. */
- if (thd->transaction_rollback_request)
+ if (thd->transaction_rollback_request || fatal_error)
{
/*
Unlikely, but transaction rollback was requested by one of storage
@@ -1220,7 +1221,9 @@ err:
}
close_thread_tables(thd); // Shouldn't be needed
thd->mdl_context.release_transactional_locks();
+#ifdef WITH_PARTITION_STORAGE_ENGINE
err2:
+#endif
thd->resume_subsequent_commits(suspended_wfc);
DBUG_RETURN(TRUE);
}