diff options
author | Georgi Kodinov <joro@sun.com> | 2009-11-27 12:32:15 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-11-27 12:32:15 +0200 |
commit | c431088d0304e7df6c47ad65b9b64a1a4700446c (patch) | |
tree | fbc183ff75ed1cc0f31743484dcba573cd03d1ef /mysql-test/r/sp-security.result | |
parent | 23bd737451ff28d06abd764c8e0696666d9aba58 (diff) | |
parent | 2ac344ecf662f6b5d901825850e3b5568ab91174 (diff) | |
download | mariadb-git-c431088d0304e7df6c47ad65b9b64a1a4700446c.tar.gz |
merge
Diffstat (limited to 'mysql-test/r/sp-security.result')
-rw-r--r-- | mysql-test/r/sp-security.result | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index 65c94577a57..5f1d9b94277 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -510,4 +510,65 @@ DROP USER mysqltest_u1@localhost; DROP PROCEDURE p_suid; DROP FUNCTION f_suid; DROP TABLE t1; +# +# Bug #48872 : Privileges for stored functions ignored if function name +# is mixed case +# +CREATE DATABASE B48872; +USE B48872; +CREATE TABLE `TestTab` (id INT); +INSERT INTO `TestTab` VALUES (1),(2); +CREATE FUNCTION `f_Test`() RETURNS INT RETURN 123; +CREATE FUNCTION `f_Test_denied`() RETURNS INT RETURN 123; +CREATE USER 'tester'; +CREATE USER 'Tester'; +GRANT SELECT ON TABLE `TestTab` TO 'tester'; +GRANT EXECUTE ON FUNCTION `f_Test` TO 'tester'; +GRANT EXECUTE ON FUNCTION `f_Test_denied` TO 'Tester'; +SELECT f_Test(); +f_Test() +123 +SELECT * FROM TestTab; +id +1 +2 +SELECT * FROM TestTab; +id +1 +2 +SELECT `f_Test`(); +`f_Test`() +123 +SELECT `F_TEST`(); +`F_TEST`() +123 +SELECT f_Test(); +f_Test() +123 +SELECT F_TEST(); +F_TEST() +123 +SELECT * FROM TestTab; +ERROR 42000: SELECT command denied to user 'Tester'@'localhost' for table 'TestTab' +SELECT `f_Test`(); +ERROR 42000: execute command denied to user 'Tester'@'%' for routine 'B48872.f_Test' +SELECT `F_TEST`(); +ERROR 42000: execute command denied to user 'Tester'@'%' for routine 'B48872.f_Test' +SELECT f_Test(); +ERROR 42000: execute command denied to user 'Tester'@'%' for routine 'B48872.f_Test' +SELECT F_TEST(); +ERROR 42000: execute command denied to user 'Tester'@'%' for routine 'B48872.f_Test' +SELECT `f_Test_denied`(); +`f_Test_denied`() +123 +SELECT `F_TEST_DENIED`(); +`F_TEST_DENIED`() +123 +DROP TABLE `TestTab`; +DROP FUNCTION `f_Test`; +DROP FUNCTION `f_Test_denied`; +USE test; +DROP USER 'tester'; +DROP USER 'Tester'; +DROP DATABASE B48872; End of 5.0 tests. |