diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-10-21 22:18:00 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-10-21 22:18:00 +0400 |
commit | 8537cf2f4ba91b7e08975842aba910d4debefc13 (patch) | |
tree | b557681e179a7a27aa8225e52e5623edc88c4db6 /mysql-test/r/timezone2.result | |
parent | 8f8236008193394ea2785c0095adf02839cde83a (diff) | |
download | mariadb-git-8537cf2f4ba91b7e08975842aba910d4debefc13.tar.gz |
Fix for bug #6116 "SET time_zone := ... requires access to
mysql.time_zone* tables".
We are excluding implicitly used time zone tables from privilege
checking.
mysql-test/r/timezone2.result:
Added test for bug #6116 "SET time_zone := ... requires access to
mysql.time_zone tables"
mysql-test/t/timezone2.test:
Added test for bug #6116 "SET time_zone := ... requires access to
mysql.time_zone tables"
sql/sql_parse.cc:
check_table_access(): we should avoid privilege checking for implicitly
used time zone tables.
sql/tztime.cc:
Indicated dependancy between my_tz_get_table_list() function and
my_tz_check_n_skip_implicit_tables() function.
sql/tztime.h:
Added my_tz_check_n_skip_implicit_tables() function which allows easily
determine whenever we have found beggining of the list of implicitly used
time zone tables and fast-forward to its end.
Diffstat (limited to 'mysql-test/r/timezone2.result')
-rw-r--r-- | mysql-test/r/timezone2.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result index 02406b77a65..86264bf5b7e 100644 --- a/mysql-test/r/timezone2.result +++ b/mysql-test/r/timezone2.result @@ -251,3 +251,23 @@ select convert_tz(ts, @@time_zone, 'Japan') from t1; convert_tz(ts, @@time_zone, 'Japan') 2001-09-09 10:46:40 drop table t1; +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\_%'; +delete from mysql.columns_priv where user like 'mysqltest\_%'; +flush privileges; +grant usage on mysqltest.* to mysqltest_1@localhost; +show grants for current_user(); +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +set time_zone= '+00:00'; +set time_zone= 'Europe/Moscow'; +select convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC'); +convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC') +2004-10-21 15:00:00 +select * from mysql.time_zone_name; +ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysql' +select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name; +ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysql' +delete from mysql.user where user like 'mysqltest\_%'; +flush privileges; |