summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index c5ef9f4e713..0cb3a1cbc11 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3010,6 +3010,10 @@ unsent_create_error:
goto error;
#else
{
+ /* Ignore temporary tables if this is "SHOW CREATE VIEW" */
+ if (lex->only_view)
+ first_table->skip_temporary= 1;
+
if (check_db_used(thd, all_tables) ||
check_access(thd, SELECT_ACL | EXTRA_ACL, first_table->db,
&first_table->grant.privilege, 0, 0))
@@ -4052,7 +4056,7 @@ unsent_create_error:
{
if (! (thd->client_capabilities & CLIENT_MULTI_RESULTS))
{
- my_message(ER_SP_BADSELECT, ER(ER_SP_BADSELECT), MYF(0));
+ my_error(ER_SP_BADSELECT, MYF(0), sp->m_qname.str);
#ifndef EMBEDDED_LIBRARY
thd->net.no_send_ok= nsok;
#endif