summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 64b21ea6ab0..03978f3a4ba 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -294,7 +294,8 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, SQL_HANDLER *reopen)
open_ltable() or open_table() because we would like to be able
to open a temporary table.
*/
- error= open_tables(thd, &tables, &counter, 0);
+ error= (open_temporary_tables(thd, tables) ||
+ open_tables(thd, &tables, &counter, 0));
if (error)
goto err;