summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-security.result
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2005-12-15 15:23:16 +0100
committerunknown <pem@mysql.com>2005-12-15 15:23:16 +0100
commit718128db908c921b3ad8b45342be33d66660bae4 (patch)
treed67ffa067273b66c4bd4f39cf188bedab71154de /mysql-test/r/sp-security.result
parent4e971ef7a6ee5de5a2a709a5eb316717e8473219 (diff)
downloadmariadb-git-718128db908c921b3ad8b45342be33d66660bae4.tar.gz
Fixed BUG#14834: Server denies to execute Stored Procedure
The problem was that databases with '_' in the name did not match a correct ACL with a literal '_' (i.e. '\_') in the db name, only identical strings matched. The fix makes this work, and also ACLs with wildcards in the db name work. mysql-test/r/sp-security.result: New test case for BUG#14834 mysql-test/t/sp-security.test: New test case for BUG#14834 sql/sql_acl.cc: Match wild db:s in ACL in acl_getroot_no_password() (used for "suid" security context switching when invoking stored routines)
Diffstat (limited to 'mysql-test/r/sp-security.result')
-rw-r--r--mysql-test/r/sp-security.result21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result
index 614e670f25d..fbc6d64f9c9 100644
--- a/mysql-test/r/sp-security.result
+++ b/mysql-test/r/sp-security.result
@@ -263,3 +263,24 @@ CREATE VIEW v1 AS SELECT test.bug12812()|
ERROR 42000: execute command denied to user 'user_bug12812'@'localhost' for routine 'test.bug12812'
DROP USER user_bug12812@localhost|
drop function bug12812|
+create database db_bug14834;
+create user user1_bug14834@localhost identified by '';
+grant all on `db\_bug14834`.* to user1_bug14834@localhost;
+create user user2_bug14834@localhost identified by '';
+grant all on `db\_bug14834`.* to user2_bug14834@localhost;
+create user user3_bug14834@localhost identified by '';
+grant all on `db__ug14834`.* to user3_bug14834@localhost;
+create procedure p_bug14834() select user(), current_user();
+call p_bug14834();
+user() current_user()
+user1_bug14834@localhost user1_bug14834@localhost
+call p_bug14834();
+user() current_user()
+user2_bug14834@localhost user1_bug14834@localhost
+call p_bug14834();
+user() current_user()
+user3_bug14834@localhost user1_bug14834@localhost
+drop user user1_bug14834@localhost;
+drop user user2_bug14834@localhost;
+drop user user3_bug14834@localhost;
+drop database db_bug14834;