summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2013-08-15 15:24:34 +0400
committerAlexander Barkov <bar@mariadb.org>2013-08-15 15:24:34 +0400
commite9ca686137f0498cc1bc25d1c67fb32769d88218 (patch)
treeeb16367beb707e7f00d4d9afe1d31575b1e1f87e /include/my_time.h
parent3462b6d3d29eebc246dbf8942baffd0ae5dd0b4f (diff)
downloadmariadb-git-e9ca686137f0498cc1bc25d1c67fb32769d88218.tar.gz
MDEV-4871 Temporal literals do not accept nanoseconds
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/my_time.h b/include/my_time.h
index 4991d996258..67aa9a27f7f 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -69,6 +69,13 @@ extern uchar days_in_month[];
#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) test((x) & MYSQL_TIME_WARN_WARNINGS)
+#define MYSQL_TIME_WARN_HAVE_NOTES(x) test((x) & MYSQL_TIME_WARN_NOTES)
/* Limits for the TIME data type */
#define TIME_MAX_HOUR 838