summaryrefslogtreecommitdiff
path: root/sql/tztime.h
diff options
context:
space:
mode:
authorunknown <dlenev@mysql.com>2006-05-02 23:16:53 +0400
committerunknown <dlenev@mysql.com>2006-05-02 23:16:53 +0400
commit1e592ac0f45eeb7a4361d769608e1e86f16dcf21 (patch)
tree174f8bda21dd95e723cbdb56e58c506381a70bba /sql/tztime.h
parent4e3dd4cccc303e0ccfe3479ef3d989ef2ea8fe55 (diff)
parente4aa059f2f397ecbf25f2ab2fa41c98c08807d04 (diff)
downloadmariadb-git-1e592ac0f45eeb7a4361d769608e1e86f16dcf21.tar.gz
Merge mysql.com:/home/dlenev/mysql-5.0-bg11081
into mysql.com:/home/dlenev/mysql-5.1-merges VC++Files/mysql.sln: Auto merged VC++Files/mysys/mysys.vcproj: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/ps_1general.result: Auto merged mysql-test/r/timezone2.result: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/ps_1general.test: Auto merged sql/sql_prepare.cc: Auto merged sql/tztime.cc: Auto merged sql/tztime.h: Auto merged tests/Makefile.am: Auto merged tests/mysql_client_test.c: Auto merged
Diffstat (limited to 'sql/tztime.h')
-rw-r--r--sql/tztime.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/tztime.h b/sql/tztime.h
index 42e50988e52..95184c9b3d1 100644
--- a/sql/tztime.h
+++ b/sql/tztime.h
@@ -70,6 +70,15 @@ extern my_time_t sec_since_epoch_TIME(TIME *t);
extern TABLE_LIST fake_time_zone_tables_list;
/*
+ Number of elements in table list produced by my_tz_get_table_list()
+ (this table list contains tables which are needed for dynamical loading
+ of time zone descriptions). Actually it is imlementation detail that
+ should not be used anywhere outside of tztime.h and tztime.cc.
+*/
+
+static const int MY_TZ_TABLES_COUNT= 4;
+
+/*
Check if we have pointer to the begining of list of implicitly used time
zone tables, set SELECT_ACL for them and fast-forward to its end.
@@ -91,9 +100,9 @@ inline bool my_tz_check_n_skip_implicit_tables(TABLE_LIST **table,
{
if (*table == tz_tables)
{
- for (int i= 0; i < 4; i++)
+ for (int i= 0; i < MY_TZ_TABLES_COUNT; i++)
(*table)[i].grant.privilege= SELECT_ACL;
- (*table)+= 3;
+ (*table)+= MY_TZ_TABLES_COUNT - 1;
return TRUE;
}
return FALSE;