diff options
Diffstat (limited to 'sql/sql_time.h')
-rw-r--r-- | sql/sql_time.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/sql_time.h b/sql/sql_time.h index a85fa16d5eb..d7d04d77f0e 100644 --- a/sql/sql_time.h +++ b/sql/sql_time.h @@ -17,7 +17,6 @@ #ifndef SQL_TIME_INCLUDED #define SQL_TIME_INCLUDED -#include "my_global.h" /* ulong */ #include "my_time.h" #include "mysql_time.h" /* timestamp_type */ #include "sql_error.h" /* Sql_condition */ @@ -39,8 +38,7 @@ bool time_to_datetime(MYSQL_TIME *ltime); void time_to_daytime_interval(MYSQL_TIME *l_time); bool get_date_from_daynr(long daynr,uint *year, uint *month, uint *day); my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, uint *error_code); -bool str_to_datetime_with_warn(CHARSET_INFO *cs, const char *str, - uint length, MYSQL_TIME *l_time, +bool str_to_datetime_with_warn(CHARSET_INFO *cs, const char *str, size_t length, MYSQL_TIME *l_time, ulonglong flags); bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime, ulonglong fuzzydate, @@ -123,8 +121,7 @@ void make_truncated_value_warning(THD *thd, const char *field_name); static inline void make_truncated_value_warning(THD *thd, - Sql_condition::enum_warning_level level, const char *str_val, - uint str_length, timestamp_type time_type, + Sql_condition::enum_warning_level level, const char *str_val, size_t str_length, timestamp_type time_type, const char *field_name) { const ErrConvString str(str_val, str_length, &my_charset_bin); @@ -171,6 +168,7 @@ bool calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2, int lsign, MYSQL_TIME *l_time3, ulonglong fuzzydate); int my_time_compare(const MYSQL_TIME *a, const MYSQL_TIME *b); void localtime_to_TIME(MYSQL_TIME *to, struct tm *from); + void calc_time_from_sec(MYSQL_TIME *to, long seconds, long microseconds); uint calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year); @@ -179,12 +177,12 @@ bool parse_date_time_format(timestamp_type format_type, const char *format, uint format_length, DATE_TIME_FORMAT *date_time_format); /* Character set-aware version of str_to_time() */ -bool str_to_time(CHARSET_INFO *cs, const char *str,uint length, +bool str_to_time(CHARSET_INFO *cs, const char *str,size_t length, MYSQL_TIME *l_time, ulonglong fuzzydate, MYSQL_TIME_STATUS *status); /* Character set-aware version of str_to_datetime() */ bool str_to_datetime(CHARSET_INFO *cs, - const char *str, uint length, + const char *str, size_t length, MYSQL_TIME *l_time, ulonglong flags, MYSQL_TIME_STATUS *status); |