summaryrefslogtreecommitdiff
path: root/mysql-test/t/grant2.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/grant2.test')
-rw-r--r--mysql-test/t/grant2.test22
1 files changed, 11 insertions, 11 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
index e2d92ee58d4..d91592f6bb6 100644
--- a/mysql-test/t/grant2.test
+++ b/mysql-test/t/grant2.test
@@ -461,13 +461,10 @@ create database TESTDB;
create table t2(a int);
create temporary table t1 as select * from mysql.user;
delete from mysql.user where host='localhost';
-INSERT INTO mysql.user VALUES
-('%','mysqltest_1',password('password'),'N','N','N','N','N','N',
-'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N',
-'','','','',0,0,0,0);
-INSERT INTO mysql.db VALUES
-('%','TESTDB','mysqltest_1','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','N','Y','Y','Y','
-Y','N');
+INSERT INTO mysql.user (host, user, password) VALUES
+('%','mysqltest_1',password('password'));
+INSERT INTO mysql.db (host, db, user, select_priv) VALUES
+('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES;
connect (con1,localhost,mysqltest_1,password,TESTDB);
@@ -491,6 +488,8 @@ flush privileges;
# BUG#13310 incorrect user parsing by SP
#
+SET GLOBAL log_bin_trust_function_creators = 1;
+
grant all privileges on test.* to `a@`@localhost;
grant execute on * to `a@`@localhost;
connect (bug13310,localhost,'a@',,test);
@@ -501,11 +500,10 @@ insert into t2 values (1);
drop function if exists f2;
--enable_warnings
delimiter //;
-create function f2 () returns int begin declare v int; select s1 from t2
-into v; return v; end//
+create function f2 () returns int
+begin declare v int; select s1 from t2 into v; return v; end//
delimiter ;//
select f2();
-
drop function f2;
drop table t2;
disconnect bug13310;
@@ -514,6 +512,8 @@ connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost;
drop user `a@`@localhost;
+SET GLOBAL log_bin_trust_function_creators = 0;
+
#
# Bug#25578 "CREATE TABLE LIKE does not require any privileges on source table"
@@ -605,7 +605,7 @@ connection conn1;
USE db1;
--error ER_COLUMNACCESS_DENIED_ERROR
SELECT c FROM t2;
---error ER_COLUMNACCESS_DENIED_ERROR
+--error ER_TABLEACCESS_DENIED_ERROR
SELECT * FROM t2;
--error ER_COLUMNACCESS_DENIED_ERROR
SELECT * FROM t1 JOIN t2 USING (b);