summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-10-13 13:42:38 +0400
committerAlexander Nozdrin <alik@sun.com>2009-10-13 13:42:38 +0400
commit0f51423532cac99ae28928e4b267a9a80c0b89f7 (patch)
treee56ffd06670e5f719dc7c91ca477eb50aa578a24 /sql/table.cc
parent3dcbeb36b4aa8362165218cdeb5cd7ba761a0dff (diff)
parent23bdf0d805026b220061487688f0cb2d2b272975 (diff)
downloadmariadb-git-0f51423532cac99ae28928e4b267a9a80c0b89f7.tar.gz
Merge from mysql-5.1.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 4442243ec14..9b27e1f8016 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -3339,7 +3339,12 @@ bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type)
/**
- Hide errors which show view underlying table information
+ Hide errors which show view underlying table information.
+ There are currently two mechanisms at work that handle errors for views,
+ this one and a more general mechanism based on an Internal_error_handler,
+ see Show_create_error_handler. The latter handles errors encountered during
+ execution of SHOW CREATE VIEW, while the machanism using this method is
+ handles SELECT from views. The two methods should not clash.
@param[in,out] thd thread handler
@@ -3348,6 +3353,8 @@ bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type)
void TABLE_LIST::hide_view_error(THD *thd)
{
+ if (thd->get_internal_handler())
+ return;
/* Hide "Unknown column" or "Unknown function" error */
DBUG_ASSERT(thd->is_error());