summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 5d5d5095e7c..6bc43e48110 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2458,7 +2458,18 @@ bool st_table_list::prepare_view_securety_context(THD *thd)
}
else
{
- my_error(ER_NO_SUCH_USER, MYF(0), definer.user.str, definer.host.str);
+ if (thd->security_ctx->master_access & SUPER_ACL)
+ {
+ my_error(ER_NO_SUCH_USER, MYF(0), definer.user.str, definer.host.str);
+
+ }
+ else
+ {
+ my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
+ thd->security_ctx->priv_user,
+ thd->security_ctx->priv_host,
+ (thd->password ? ER(ER_YES) : ER(ER_NO)));
+ }
DBUG_RETURN(TRUE);
}
}