summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorjan@hundin.mysql.fi <>2004-12-21 07:49:38 +0200
committerjan@hundin.mysql.fi <>2004-12-21 07:49:38 +0200
commit198dc7a8ec6e220c348bb47e59a2ac7532be18b8 (patch)
tree5d3767a8558fd05da17b5d4e3f361ef643d3a9b8 /sql/sql_derived.cc
parentc187798fcbdb055bc69ec727c81840a132481cbe (diff)
parent88b63ab6690bd453a1b841968b468759898cd94a (diff)
downloadmariadb-git-198dc7a8ec6e220c348bb47e59a2ac7532be18b8.tar.gz
Content merge.
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 69511018880..1d4b911bb65 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -140,6 +140,18 @@ int mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *orig_table_list)
derived_result->set_table(table);
exit:
+ /* Hide "Unknown column" or "Unknown function" error */
+ if (orig_table_list->view)
+ {
+ if (thd->net.last_errno == ER_BAD_FIELD_ERROR ||
+ thd->net.last_errno == ER_SP_DOES_NOT_EXIST)
+ {
+ thd->clear_error();
+ my_error(ER_VIEW_INVALID, MYF(0), orig_table_list->db,
+ orig_table_list->real_name);
+ }
+ }
+
/*
if it is preparation PS only or commands that need only VIEW structure
then we do not need real data and we can skip execution (and parameters
@@ -256,13 +268,8 @@ int mysql_derived_filling(THD *thd, LEX *lex, TABLE_LIST *orig_table_list)
unit->cleanup();
}
else
- {
- free_tmp_table(thd, table);
unit->cleanup();
- }
lex->current_select= save_current_select;
- if (res)
- free_tmp_table(thd, table);
}
return res;
}