summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-10-21 22:18:00 +0400
committerunknown <dlenev@brandersnatch.localdomain>2004-10-21 22:18:00 +0400
commit8537cf2f4ba91b7e08975842aba910d4debefc13 (patch)
treeb557681e179a7a27aa8225e52e5623edc88c4db6 /sql/tztime.cc
parent8f8236008193394ea2785c0095adf02839cde83a (diff)
downloadmariadb-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 'sql/tztime.cc')
-rw-r--r--sql/tztime.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 08e6fc7026e..c2143b0d5dd 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1434,6 +1434,10 @@ tz_init_table_list(TABLE_LIST *tz_tabs)
This function creates list of TABLE_LIST objects allocated in thd's
memroot, which can be used for opening of time zone tables.
+ NOTE
+ my_tz_check_n_skip_implicit_tables() function depends on fact that
+ elements of list created are allocated as TABLE_LIST[4] array.
+
RETURN VALUES
Returns pointer to first TABLE_LIST object, (could be 0 if time zone
tables don't exist) and &fake_time_zone_tables_list in case of error.