summaryrefslogtreecommitdiff
path: root/sql/sql_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_time.h')
-rw-r--r--sql/sql_time.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_time.h b/sql/sql_time.h
index c1a75bb2ad3..f8b1e950b14 100644
--- a/sql/sql_time.h
+++ b/sql/sql_time.h
@@ -110,4 +110,18 @@ extern DATE_TIME_FORMAT global_time_format;
extern KNOWN_DATE_TIME_FORMAT known_date_time_formats[];
extern LEX_STRING interval_type_to_name[];
+
+static inline bool
+non_zero_date(const MYSQL_TIME *ltime)
+{
+ return ltime->year || ltime->month || ltime->day;
+}
+static inline bool
+check_date(const MYSQL_TIME *ltime, ulonglong flags, int *was_cut)
+{
+ return check_date(ltime, non_zero_date(ltime), flags, was_cut);
+}
+bool check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date,
+ timestamp_type ts_type);
+
#endif /* SQL_TIME_INCLUDED */