summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-05-01 01:19:30 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-05-02 01:02:56 +0530
commit57c37e6c3ffc69c9a682601bd0c2e286b4743876 (patch)
tree2b7abf8182c5e9c6f4a30a1c387ad45d83579956
parente9da78ee92c3f44b341a1a68504da72494a684b9 (diff)
downloadmariadb-git-57c37e6c3ffc69c9a682601bd0c2e286b4743876.tar.gz
Adjusting sql_command to align with higher version, this is an adjustment
to the patch for MDEV-17605
-rw-r--r--sql/sql_show.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 7f0c50a2e55..d8b35eda089 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -4272,8 +4272,8 @@ fill_schema_table_by_open(THD *thd, bool is_show_fields_or_keys,
SQLCOM_SHOW_FIELDS is used because it satisfies
'only_view_structure()'.
*/
- lex->sql_command= SQLCOM_SHOW_FIELDS;
thd->force_read_stats= get_schema_table_idx(schema_table) == SCH_STATISTICS;
+ lex->sql_command= SQLCOM_SHOW_FIELDS;
result= (open_temporary_tables(thd, table_list) ||
open_normal_and_derived_tables(thd, table_list,
(MYSQL_OPEN_IGNORE_FLUSH |
@@ -4281,16 +4281,15 @@ fill_schema_table_by_open(THD *thd, bool is_show_fields_or_keys,
(can_deadlock ?
MYSQL_OPEN_FAIL_ON_MDL_CONFLICT : 0)),
DT_PREPARE | DT_CREATE));
-
- (void) read_statistics_for_tables_if_needed(thd, table_list);
- thd->force_read_stats= false;
-
/*
Restore old value of sql_command back as it is being looked at in
process_table() function.
*/
lex->sql_command= old_lex->sql_command;
+ (void) read_statistics_for_tables_if_needed(thd, table_list);
+ thd->force_read_stats= false;
+
DEBUG_SYNC(thd, "after_open_table_ignore_flush");
/*