summaryrefslogtreecommitdiff
path: root/mysql-test/r/timezone_grant.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/timezone_grant.result')
-rw-r--r--mysql-test/r/timezone_grant.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/timezone_grant.result b/mysql-test/r/timezone_grant.result
index d33d92dbc9e..42ce458d00f 100644
--- a/mysql-test/r/timezone_grant.result
+++ b/mysql-test/r/timezone_grant.result
@@ -9,6 +9,8 @@ create table t1 (a int, b datetime);
create table t2 (c int, d datetime);
create user mysqltest_1@localhost;
grant all privileges on test.* to mysqltest_1@localhost;
+connect tzuser, localhost, mysqltest_1,,;
+connection tzuser;
show grants for current_user();
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
@@ -26,10 +28,15 @@ select * from mysql.time_zone_name;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
+connection default;
+disconnect tzuser;
+connection default;
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
grant all privileges on test.t1 to mysqltest_1@localhost;
grant all privileges on test.t2 to mysqltest_1@localhost;
+connect tzuser2, localhost, mysqltest_1,,;
+connection tzuser2;
show grants for current_user();
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
@@ -57,6 +64,8 @@ update t1 set b = '2005-01-01 10:00';
update t1 set b = convert_tz(b, 'UTC', 'UTC');
update t1 join t2 on (t1.a = t2.a) set t1.b = '2005-01-01 10:00' where t2.b = 'foo';
update t1 join t2 on (t1.a = t2.a) set t1.b = convert_tz('2005-01-01 10:00','UTC','UTC') where t2.b = 'foo';
+connection default;
+disconnect tzuser2;
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
@@ -66,6 +75,7 @@ create table t1 (a int, b datetime);
insert into t1 values (1, 20010101000000), (2, 20020101000000);
create user mysqltest_1@localhost;
grant all privileges on test.* to mysqltest_1@localhost;
+connect tzuser3, localhost, mysqltest_1,,;
create view v1 as select a, convert_tz(b, 'UTC', 'Europe/Moscow') as lb from t1;
select * from v1;
a lb
@@ -76,5 +86,7 @@ ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table '
drop view v1;
create view v1 as select a, convert_tz(b, 'UTC', 'Europe/Moscow') as lb from t1, mysql.time_zone;
ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 'time_zone'
+connection default;
+disconnect tzuser3;
drop table t1;
drop user mysqltest_1@localhost;