diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-06-29 15:50:44 +0500 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-06-29 15:50:44 +0500 |
commit | 3939e3becd0c195bf4e430a19cb025706f336ef4 (patch) | |
tree | 52d40c61c4e809ee56942d62dc140ac32dcfeb3c /mysql-test/t/sp_notembedded.test | |
parent | 227dc58b01b95506538ed33382c5b809f20e9455 (diff) | |
download | mariadb-git-3939e3becd0c195bf4e430a19cb025706f336ef4.tar.gz |
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
user name is calculated on function execution stage instead of parse stage
mysql-test/r/sp_notembedded.result:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
test case
mysql-test/t/sp_notembedded.test:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
test case
sql/mysql_priv.h:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
new get_current_user(THD *thd, LEX_USER *user) function
sql/sql_acl.cc:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
user name is calculated using get_current_user() function
sql/sql_parse.cc:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
new get_current_user() function
user name is calculated using get_current_user() function
sql/sql_yacc.yy:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
empty LEX_USER struct for CURRENT USER,
user name is calculated on function execution stage
Diffstat (limited to 'mysql-test/t/sp_notembedded.test')
-rw-r--r-- | mysql-test/t/sp_notembedded.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index 0adbeb2d98b..b087f699f86 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -265,3 +265,23 @@ drop view v1| drop table t3| delimiter ;| + +# +# Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context +# +--disable_warnings +drop procedure if exists bug15298_1; +drop procedure if exists bug15298_2; +--enable_warnings +grant all privileges on test.* to 'mysqltest_1'@'localhost'; +create procedure 15298_1 () sql security definer show grants for current_user; +create procedure 15298_2 () sql security definer show grants; + +connect (con1,localhost,mysqltest_1,,test); +call 15298_1(); +call 15298_2(); + +connection default; +drop user mysqltest_1@localhost; +drop procedure 15298_1; +drop procedure 15298_2; |