summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/set_var.cc4
-rw-r--r--sql/sql_select.cc1
-rw-r--r--sql/sql_show.cc9
3 files changed, 3 insertions, 11 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 12ec76327f4..e6c1bf94135 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -650,6 +650,8 @@ static sys_var_thd_enum sys_query_cache_type(&vars, "query_cache_type",
static sys_var_thd_bool
sys_query_cache_wlock_invalidate(&vars, "query_cache_wlock_invalidate",
&SV::query_cache_wlock_invalidate);
+static sys_var_bool_ptr sys_query_cache_strip_comments(&vars, "query_cache_strip_comments",
+ &opt_query_cache_strip_comments);
#endif /* HAVE_QUERY_CACHE */
static sys_var_bool_ptr sys_secure_auth(&vars, "secure_auth", &opt_secure_auth);
static sys_var_const_str_ptr sys_secure_file_priv(&vars, "secure_file_priv",
@@ -939,8 +941,6 @@ static sys_var_const_str sys_hostname(&vars, "hostname", glob_hostname);
static sys_var_const_str_ptr sys_log_basename(&vars, "log_basename",
&opt_log_basename);
-static sys_var_bool_ptr sys_query_cache_strip_comments(&vars, "query_cache_strip_comments",
- &opt_query_cache_strip_comments);
#ifndef EMBEDDED_LIBRARY
static sys_var_const_str_ptr sys_repl_report_host(&vars, "report_host", &report_host);
static sys_var_const_str_ptr sys_repl_report_user(&vars, "report_user", &report_user);
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 313159d33d1..7a8f4e854ec 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -14473,6 +14473,7 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
goto err;
}
status_var_increment(table->in_use->status_var.created_tmp_disk_tables);
+ table->in_use->query_plan_flags|= QPLAN_TMP_DISK;
share->db_record_offset= 1;
table->created= TRUE;
DBUG_RETURN(0);
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 21036554c91..0e8b919db53 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -760,7 +760,6 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
Protocol *protocol= thd->protocol;
char buff[2048];
String buffer(buff, sizeof(buff), system_charset_info);
- char *save_db, *save_table_name;
bool retval= TRUE; // Assume error
List<Item> field_list;
DBUG_ENTER("mysqld_show_create");
@@ -770,10 +769,6 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
/* We want to preserve the tree for views. */
thd->lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VIEW;
- /* Store original names if called from SP */
- save_db= table_list->db;
- save_table_name= table_list->table_name;
-
{
Show_create_error_handler view_error_suppressor(thd, table_list);
thd->push_internal_handler(&view_error_suppressor);
@@ -857,11 +852,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
retval= FALSE; // ok
error:
- /* Restore table list if called by stored procedure */
- table_list->db= save_db;
- table_list->table_name= save_table_name;
DBUG_RETURN(retval);
-
}
bool mysqld_show_create_db(THD *thd, char *dbname,