diff options
author | unknown <anozdrin/alik@quad.opbmk> | 2008-03-28 14:40:11 +0300 |
---|---|---|
committer | unknown <anozdrin/alik@quad.opbmk> | 2008-03-28 14:40:11 +0300 |
commit | 1abfb6e040c7c3b9b157d213cc4e46af3773ce20 (patch) | |
tree | fe37fd28b0f89bc024512c0d2a69e82f3d7e2f5c /mysql-test/t/grant.test | |
parent | f4c65a0193b4d65b2a451b5d825c3a7273f89db8 (diff) | |
parent | 0cf83bbf56f13c4391e557cee5271259aff64d19 (diff) | |
download | mariadb-git-1abfb6e040c7c3b9b157d213cc4e46af3773ce20.tar.gz |
Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1
into quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
mysql-test/r/grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/sql_acl.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/grant.test')
-rw-r--r-- | mysql-test/t/grant.test | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 44e7945847c..3fac767468e 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1406,4 +1406,66 @@ DROP USER mysqltest_1@localhost; FLUSH PRIVILEGES; +# +# Bug#33464: DROP FUNCTION caused a crash. +# +CREATE DATABASE dbbug33464; +CREATE USER 'userbug33464'@'localhost'; + +GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost'; + +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (connbug33464, localhost, userbug33464, , dbbug33464); +--source suite/funcs_1/include/show_connection.inc + +--disable_warnings +DROP PROCEDURE IF EXISTS sp3; +DROP FUNCTION IF EXISTS fn1; +--enable_warnings + +delimiter //; +CREATE PROCEDURE sp3(v1 char(20)) +BEGIN + SELECT * from dbbug33464.t6 where t6.f2= 'xyz'; +END// +delimiter ;// + +delimiter //; +CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER +BEGIN + return 1; +END// +delimiter ;// + +delimiter //; +CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER +BEGIN + return 2; +END// +delimiter ;// + +disconnect connbug33464; + +# cleanup +connection default; +USE dbbug33464; +--source suite/funcs_1/include/show_connection.inc + +SELECT fn1(); +SELECT fn2(); + +--error 0, ER_CANNOT_USER +DROP USER 'userbug33464'@'localhost'; + +DROP FUNCTION fn1; +DROP FUNCTION fn2; +DROP PROCEDURE sp3; + +--error 0, ER_CANNOT_USER +DROP USER 'userbug33464'@'localhost'; + +use test; +DROP DATABASE dbbug33464; + + --echo End of 5.1 tests |