summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 7c6f61d6edc..c51a01fc215 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -758,7 +758,10 @@ int THD::send_explain_fields(select_result *result)
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (lex->describe & DESCRIBE_PARTITIONS)
{
- field_list.push_back(item= new Item_empty_string("partitions", 10, cs));
+ /* Maximum length of string that make_used_partitions_str() can produce */
+ item= new Item_empty_string("partitions", MAX_PARTITIONS * (1 + FN_LEN),
+ cs);
+ field_list.push_back(item);
item->maybe_null= 1;
}
#endif