summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 7253f33f769..4d904199efc 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2017, MariaDB
+ Copyright (c) 2009, 2019, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -4640,7 +4640,10 @@ fill_schema_table_by_open(THD *thd, MEM_ROOT *mem_root,
}
DBUG_ASSERT(thd->lex == lex);
+ thd->force_read_stats= get_schema_table_idx(schema_table) == SCH_STATISTICS;
result= open_tables_only_view_structure(thd, table_list, can_deadlock);
+ (void) read_statistics_for_tables_if_needed(thd, table_list);
+ thd->force_read_stats= false;
DEBUG_SYNC(thd, "after_open_table_ignore_flush");
@@ -6302,7 +6305,8 @@ bool store_schema_params(THD *thd, TABLE *table, TABLE *proc_table,
sph= Sp_handler::handler_mysql_proc((stored_procedure_type)
proc_table->field[MYSQL_PROC_MYSQL_TYPE]->
val_int());
- if (!sph)
+ if (!sph || sph->type() == TYPE_ENUM_PACKAGE ||
+ sph->type() == TYPE_ENUM_PACKAGE_BODY)
DBUG_RETURN(0);
if (!full_access)