summaryrefslogtreecommitdiff
path: root/sql/sql_alter.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-05-25 11:51:43 +0300
committerMonty <monty@mariadb.org>2018-05-26 12:49:25 +0300
commitd8da920264a0321e6d03b3cbe3c3b414f622aefa (patch)
tree1457dcbdcaeade1c13bcbcc124fbd97e10e74f34 /sql/sql_alter.cc
parent199517f501b5d50daf85d3d5620cb391c03fddfe (diff)
downloadmariadb-git-d8da920264a0321e6d03b3cbe3c3b414f622aefa.tar.gz
MDEV-10679 Crash in performance schema and partitioning with discovery
Crash happened because in discover, table->work_part_info was not properly reset before execution. Fixed by resetting before calling execute alter table, create table or mysql_create_frm_image.
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r--sql/sql_alter.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc
index bff45e089a4..6f21fb4b931 100644
--- a/sql/sql_alter.cc
+++ b/sql/sql_alter.cc
@@ -262,8 +262,8 @@ bool Sql_cmd_alter_table::execute(THD *thd)
- For temporary MERGE tables we do not track if their child tables are
base or temporary. As result we can't guarantee that privilege check
- which was done in presence of temporary child will stay relevant later
- as this temporary table might be removed.
+ which was done in presence of temporary child will stay relevant
+ later as this temporary table might be removed.
If SELECT_ACL | UPDATE_ACL | DELETE_ACL privileges were not checked for
the underlying *base* tables, it would create a security breach as in
@@ -303,6 +303,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
create_info.data_file_name= create_info.index_file_name= NULL;
thd->enable_slow_log= opt_log_slow_admin_statements;
+ thd->work_part_info= 0;
#ifdef WITH_WSREP
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl);