summaryrefslogtreecommitdiff
path: root/sql/sql_table.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_table.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_table.cc')
-rw-r--r--sql/sql_table.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 31da585443a..a68f9e626e0 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -6057,6 +6057,7 @@ remove_key:
}
}
+ DBUG_ASSERT(thd->work_part_info == 0);
#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info *tab_part_info= table->part_info;
thd->work_part_info= thd->lex->part_info;
@@ -8411,6 +8412,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
DBUG_ENTER("mysql_alter_table");
+ thd->work_part_info= 0; // Used by partitioning
+
/*
Check if we attempt to alter mysql.slow_log or
mysql.general_log table and return an error if