summaryrefslogtreecommitdiff
path: root/sql/sp.h
diff options
context:
space:
mode:
authorDmitry Lenev <Dmitry.Lenev@oracle.com>2011-04-22 16:59:10 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-07-23 16:45:20 +0400
commita6ab8ef9d7d465a3f0bc1cff6034ca97575629dd (patch)
tree01d03cba16707b58fd78dccd70e4a8026f9c5230 /sql/sp.h
parentd897015d74d82464a21ed154f606adc69503c372 (diff)
downloadmariadb-git-a6ab8ef9d7d465a3f0bc1cff6034ca97575629dd.tar.gz
MDEV-5997 - MySQL bug#11759114 - '51401: GRANT TREATS NONEXISTENT
FUNCTIONS/PRIVILEGES DIFFERENTLY' Fix for bug#11759114 - '51401: GRANT TREATS NONEXISTENT FUNCTIONS/PRIVILEGES DIFFERENTLY'. The problem was that attempt to grant EXECUTE or ALTER ROUTINE privilege on stored procedure which didn't exist succeed instead of returning an appropriate error like it happens in similar situation for stored functions or tables. The code which handles granting of privileges on individual routine calls sp_exist_routines() function to check if routine exists and assumes that the 3rd parameter of the latter specifies whether it should check for existence of stored procedure or function. In practice, this parameter had completely different meaning and, as result, this check was not done properly for stored procedures. This fix addresses this problem by bringing sp_exist_routines() signature and code in line with expectation of its caller. Conflicts: mysql-test/r/grant.result mysql-test/t/grant.test sql/sp.cc
Diffstat (limited to 'sql/sp.h')
-rw-r--r--sql/sp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sp.h b/sql/sp.h
index 3353132346b..82d4704cf2c 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -121,7 +121,7 @@ sp_cache_routine(THD *thd, stored_procedure_type type, sp_name *name,
bool lookup_only, sp_head **sp);
bool
-sp_exist_routines(THD *thd, TABLE_LIST *procs, bool any);
+sp_exist_routines(THD *thd, TABLE_LIST *procs, bool is_proc);
bool
sp_show_create_routine(THD *thd, stored_procedure_type type, sp_name *name);