summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2014-06-04 21:53:15 +0400
committerAlexander Barkov <bar@mariadb.org>2014-06-04 21:53:15 +0400
commit284479c085f005a705d31e37e9cd85bb670d615e (patch)
tree044868e9c5a27a60750f3389ca63763f2bbc1ef0 /include/my_time.h
parent55bfabf9715c15df16adb4a3e8880deb4943df2b (diff)
parent661daf16f11ffa879ffb005008b6e73f6744e0ad (diff)
downloadmariadb-git-284479c085f005a705d31e37e9cd85bb670d615e.tar.gz
Merge 5.3->5.5
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/my_time.h b/include/my_time.h
index f9893fa2d01..bcf1a8cb215 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -79,6 +79,13 @@ typedef long my_time_t;
#define MYSQL_TIME_WARN_TRUNCATED 1
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2
+#define MYSQL_TIME_NOTE_TRUNCATED 16
+
+#define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|MYSQL_TIME_WARN_OUT_OF_RANGE)
+#define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED)
+
+#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) MY_TEST((x) & MYSQL_TIME_WARN_WARNINGS)
+#define MYSQL_TIME_WARN_HAVE_NOTES(x) MY_TEST((x) & MYSQL_TIME_WARN_NOTES)
/* Limits for the TIME data type */
#define TIME_MAX_HOUR 838
@@ -112,7 +119,7 @@ longlong double_to_datetime(double nr, MYSQL_TIME *ltime, uint flags, int *cut)
ltime, flags, cut);
}
-int number_to_time(my_bool neg, longlong nr, ulong sec_part,
+int number_to_time(my_bool neg, ulonglong nr, ulong sec_part,
MYSQL_TIME *ltime, int *was_cut);
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *);