summaryrefslogtreecommitdiff
path: root/sql/temporary_tables.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/temporary_tables.cc')
-rw-r--r--sql/temporary_tables.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc
index b39423e9131..2e0f0a4918e 100644
--- a/sql/temporary_tables.cc
+++ b/sql/temporary_tables.cc
@@ -346,6 +346,13 @@ bool THD::open_temporary_table(TABLE_LIST *tl)
DBUG_RETURN(false);
}
+ if (!tl->db.str)
+ {
+ DBUG_PRINT("info",
+ ("Table reference to a temporary table must have database set"));
+ DBUG_RETURN(false);
+ }
+
/*
Temporary tables are not safe for parallel replication. They were
designed to be visible to one thread only, so have no table locking.