Commit 6a468737 authored by davi@mysql.com/endora.local's avatar davi@mysql.com/endora.local
Browse files

Bug#34108 "Drop function" (test "storedproc_06") returns different message (all handlers)

The problem is that the patch for Bug 33464 didn't update the
results of the test cases which caused the problem.

Dropping a stored routine also revoke privileges for all users
on the stored routine and errors about missing grants are converted
into warnings. Before Bug 33464 such errors could be incorrectly
returned to the user, which would later trigger a assertion due to
multiple errors being set.
parent e1d31e62
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -132,9 +132,7 @@ drop user 'user_1'@'localhost';
DROP PROCEDURE sp3;
DROP FUNCTION fn1;
Warnings:
Error	1133	Can't find any matching row in the user table
Error	1269	Can't revoke all privileges for one or more of the requested users
Warning	1405	Failed to revoke all privileges to dropped routine
Warning	1403	There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1'

Testcase 3.1.6.4:
-----------------
+1 −3
Original line number Diff line number Diff line
@@ -132,9 +132,7 @@ drop user 'user_1'@'localhost';
DROP PROCEDURE sp3;
DROP FUNCTION fn1;
Warnings:
Error	1133	Can't find any matching row in the user table
Error	1269	Can't revoke all privileges for one or more of the requested users
Warning	1405	Failed to revoke all privileges to dropped routine
Warning	1403	There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1'

Testcase 3.1.6.4:
-----------------
+1 −3
Original line number Diff line number Diff line
@@ -132,9 +132,7 @@ drop user 'user_1'@'localhost';
DROP PROCEDURE sp3;
DROP FUNCTION fn1;
Warnings:
Error	1133	Can't find any matching row in the user table
Error	1269	Can't revoke all privileges for one or more of the requested users
Warning	1405	Failed to revoke all privileges to dropped routine
Warning	1403	There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1'

Testcase 3.1.6.4:
-----------------
+1 −3
Original line number Diff line number Diff line
@@ -132,9 +132,7 @@ drop user 'user_1'@'localhost';
DROP PROCEDURE sp3;
DROP FUNCTION fn1;
Warnings:
Error	1133	Can't find any matching row in the user table
Error	1269	Can't revoke all privileges for one or more of the requested users
Warning	1405	Failed to revoke all privileges to dropped routine
Warning	1403	There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1'

Testcase 3.1.6.4:
-----------------
+4 −0
Original line number Diff line number Diff line
@@ -148,6 +148,10 @@ USE db_storedproc_1;

drop user 'user_1'@'localhost';
DROP PROCEDURE sp3;
# This drop function shouldn't generated a warning as the
# privileges should have been removed when the user was
# dropped. Reported as Bug#36544 DROP USER does not remove
# stored function privileges
DROP FUNCTION fn1;


Loading