summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorKaren Langford <karen.langford@oracle.com>2011-07-06 00:56:51 +0200
committerKaren Langford <karen.langford@oracle.com>2011-07-06 00:56:51 +0200
commit8c001894f5a9e8350d621243c60870db6de84566 (patch)
treeeefc26771a8f290ae8b29e9d7ecb41b19010a909 /sql/sp_head.cc
parent986984a314535116e01d212b6ae19c3a0dabc2b8 (diff)
parenta83ac4ceb231ede7b82aaa47af635b393859968e (diff)
downloadmariadb-git-8c001894f5a9e8350d621243c60870db6de84566.tar.gz
Merge from mysql-5.1.58-release
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 0ec8ce11c65..95a7eda0540 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2403,7 +2403,8 @@ 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, 1, TRUE) ||
+ *full_access= ((!check_table_access(thd, SELECT_ACL, &tables, 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,