summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorhery.ramilison@oracle.com <>2011-07-06 01:13:50 +0200
committerMySQL Release Engineering <mysql-re_ww@oracle.com>2011-07-06 01:13:50 +0200
commitc74d844de30136c570c3bca089d1f2949d00603c (patch)
tree31e14059cf5a1e5e8c1601a2488b98c4af1bfeb0 /sql/sp_head.cc
parent3b69f27e59909e67fed27c4d728b96483188a663 (diff)
parent1c810152963f770fae011b29ae30fbafbc516b23 (diff)
downloadmariadb-git-c74d844de30136c570c3bca089d1f2949d00603c.tar.gz
Merge from mysql-5.5.14-release
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 7c5b5be3e00..ce713504a38 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2591,8 +2591,9 @@ bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access)
bzero((char*) &tables,sizeof(tables));
tables.db= (char*) "mysql";
tables.table_name= tables.alias= (char*) "proc";
- *full_access= (!check_table_access(thd, SELECT_ACL, &tables, FALSE,
- 1, TRUE) ||
+ *full_access= ((!check_table_access(thd, SELECT_ACL, &tables, FALSE,
+ 1, TRUE) &&
+ (tables.grant.privilege & SELECT_ACL) != 0) ||
(!strcmp(sp->m_definer_user.str,
thd->security_ctx->priv_user) &&
!strcmp(sp->m_definer_host.str,