[MDEV-5997] MySQL bug#11759114 - '51401: GRANT TREATS NONEXISTENT FUNCTIONS/PRIVILEGES DIFFERENTLY' Created: 2014-04-01  Updated: 2015-07-23  Resolved: 2015-07-23

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: 10.0.10
Fix Version/s: 10.0.21, 10.1.6

Type: Bug Priority: Minor
Reporter: Sergey Vojtovich Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-4784 merge test cases from 5.6 Stalled
Sprint: 10.0.20

 Description   

revno: 2876.425.12
committer: Dmitry Lenev <Dmitry.Lenev@oracle.com>
branch nick: mysql-trunk-11759114
timestamp: Fri 2011-04-22 16:59:10 +0400
message:
  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.



 Comments   
Comment by Sergey Vojtovich [ 2015-07-23 ]

serg, I believe this patch is reasonable as it is, what's your take? Fix is at commits@ as usual.

Generated at Thu Feb 08 07:08:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.