summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorjani@ua141d10.elisa.omakaista.fi <>2006-06-01 20:39:12 +0300
committerjani@ua141d10.elisa.omakaista.fi <>2006-06-01 20:39:12 +0300
commitdea377fafc55c9676486b6e076cb4fe96049874f (patch)
tree802d23d218acf57d4a789cb1fb868630268ef72b /sql/table.cc
parent5e634e7d880cc2a6858d5cca0a79aefe6b4ce8e4 (diff)
parentb5158f252d40b1efaa09b0b2c3f86d292d68d888 (diff)
downloadmariadb-git-dea377fafc55c9676486b6e076cb4fe96049874f.tar.gz
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-new-marvel
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 5d7b788c755..edbe6c39e3f 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2832,7 +2832,8 @@ void st_table_list::hide_view_error(THD *thd)
if (thd->net.last_errno == ER_BAD_FIELD_ERROR ||
thd->net.last_errno == ER_SP_DOES_NOT_EXIST ||
thd->net.last_errno == ER_PROCACCESS_DENIED_ERROR ||
- thd->net.last_errno == ER_COLUMNACCESS_DENIED_ERROR)
+ thd->net.last_errno == ER_COLUMNACCESS_DENIED_ERROR ||
+ thd->net.last_errno == ER_TABLEACCESS_DENIED_ERROR)
{
TABLE_LIST *top= top_table();
thd->clear_error();
@@ -3192,8 +3193,18 @@ bool st_table_list::prepare_view_securety_context(THD *thd)
definer.host.str,
thd->db))
{
- my_error(ER_NO_SUCH_USER, MYF(0), definer.user.str, definer.host.str);
- DBUG_RETURN(TRUE);
+ if (thd->lex->sql_command == SQLCOM_SHOW_CREATE)
+ {
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_NO_SUCH_USER,
+ ER(ER_NO_SUCH_USER),
+ definer.user.str, definer.host.str);
+ }
+ else
+ {
+ my_error(ER_NO_SUCH_USER, MYF(0), definer.user.str, definer.host.str);
+ DBUG_RETURN(TRUE);
+ }
}
}
DBUG_RETURN(FALSE);