summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 978b8e41930..fe3efd720f0 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -284,6 +284,14 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
#define WEEK_MONDAY_FIRST 1
#define WEEK_YEAR 2
#define WEEK_FIRST_WEEKDAY 4
+/*
+ Required buffer length for make_date, make_time, make_datetime
+ and TIME_to_string functions. Note, that the caller is still
+ responsible to check that given TIME structure has values
+ in valid ranges, otherwise size of the buffer could be not
+ enough.
+*/
+#define MAX_DATE_REP_LENGTH 30
struct st_table;
class THD;
@@ -997,9 +1005,17 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
timestamp_type type);
extern bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time,
timestamp_type type, String *str);
-extern void make_time(DATE_TIME_FORMAT *format, TIME *l_time, String *str);
-void make_date(DATE_TIME_FORMAT *format, TIME *l_time, String *str);
-void make_datetime(DATE_TIME_FORMAT *format, TIME *l_time, String *str);
+void make_datetime(const DATE_TIME_FORMAT *format, const TIME *l_time,
+ String *str);
+void make_date(const DATE_TIME_FORMAT *format, const TIME *l_time,
+ String *str);
+void make_time(const DATE_TIME_FORMAT *format, const TIME *l_time,
+ String *str);
+void TIME_to_string(const TIME *time, String *str);
+ulonglong TIME_to_ulonglong_datetime(const TIME *time);
+ulonglong TIME_to_ulonglong_date(const TIME *time);
+ulonglong TIME_to_ulonglong_time(const TIME *time);
+ulonglong TIME_to_ulonglong(const TIME *time);
int test_if_number(char *str,int *res,bool allow_wildcards);
void change_byte(byte *,uint,char,char);