diff options
author | gluh@eagle.intranet.mysql.r18.ru <> | 2006-06-29 15:50:44 +0500 |
---|---|---|
committer | gluh@eagle.intranet.mysql.r18.ru <> | 2006-06-29 15:50:44 +0500 |
commit | 9901efea1f23b697a08f13ff6e6061985d01331b (patch) | |
tree | 52d40c61c4e809ee56942d62dc140ac32dcfeb3c /mysql-test/t/sp_notembedded.test | |
parent | e5dbc49bb06d2600fc1d6e6e0202d36f8fa9ebb9 (diff) | |
download | mariadb-git-9901efea1f23b697a08f13ff6e6061985d01331b.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
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; |