summaryrefslogtreecommitdiff
path: root/sql/tztime.h
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-10-29 19:26:52 +0300
committermonty@mysql.com <>2004-10-29 19:26:52 +0300
commitafbe601302fc59c498437321b296ed6c8d360564 (patch)
tree23bcc9a71fe7237887a111b158e30f5a6bb665d3 /sql/tztime.h
parent67456bb970cc949ceb5779b230592e455843c35c (diff)
parent541883f9d89a8d38affba60bf9506289a6232da1 (diff)
downloadmariadb-git-afbe601302fc59c498437321b296ed6c8d360564.tar.gz
merge with 4.1
Diffstat (limited to 'sql/tztime.h')
-rw-r--r--sql/tztime.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/sql/tztime.h b/sql/tztime.h
index 1325e921c67..6d2388bb160 100644
--- a/sql/tztime.h
+++ b/sql/tztime.h
@@ -64,6 +64,35 @@ extern Time_zone * my_tz_find(const String *name, TABLE_LIST *tz_tables);
extern my_bool my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap);
extern void my_tz_free();
+
+/*
+ Check if we have pointer to the beggining of list of implictly used
+ time zone tables and fast-forward to its end.
+
+ SYNOPSIS
+ my_tz_check_n_skip_implicit_tables()
+ table - (in/out) pointer to element of table list to check
+ tz_tables - list of implicitly used time zone tables received
+ from my_tz_get_table_list() function.
+
+ NOTE
+ This function relies on my_tz_get_table_list() implementation.
+
+ RETURN VALUE
+ TRUE - if table points to the beggining of tz_tables list
+ FALSE - otherwise.
+*/
+inline bool my_tz_check_n_skip_implicit_tables(TABLE_LIST **table,
+ TABLE_LIST *tz_tables)
+{
+ if (*table == tz_tables)
+ {
+ (*table)+= 3;
+ return TRUE;
+ }
+ return FALSE;
+}
+
/*
Maximum length of time zone name that we support
(Time zone name is char(64) in db)