summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2004-12-16 16:31:36 +0300
committerunknown <gluh@gluh.mysql.r18.ru>2004-12-16 16:31:36 +0300
commit05bbcee9e6b47e1dac257696ff539c1c45fa1c4d (patch)
tree9092e19720261600bd1d7610193da9f4fcd1781a /sql/sql_derived.cc
parent7845f99abf1d36e972970c0fc9431956a8f4b63a (diff)
downloadmariadb-git-05bbcee9e6b47e1dac257696ff539c1c45fa1c4d.tar.gz
Fix for bug#7212: information_schema: "Can't find file" errors if storage engine gone(after review)
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 69511018880..7cea1c6fcee 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