summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikael Ronström <mikael@dator9>2011-02-10 18:15:19 +0100
committerMikael Ronström <mikael@dator9>2011-02-10 18:15:19 +0100
commite3f89e5dbac66b34db735ae44a21e6d489a7f28e (patch)
tree47a4be74fb4e90a025c800c4e4290a9427824390 /include
parent70136c0aa252d8da2c698f3635ddce8c60b26bc3 (diff)
parent50c9f1f63d322872a2a36d82fa75eb72c55f6d5c (diff)
downloadmariadb-git-e3f89e5dbac66b34db735ae44a21e6d489a7f28e.tar.gz
merge
Diffstat (limited to 'include')
-rw-r--r--include/my_pthread.h2
-rw-r--r--include/my_sys.h4
-rw-r--r--include/my_time.h13
3 files changed, 16 insertions, 3 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index f1636cad136..b8608a97849 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/my_sys.h b/include/my_sys.h
index 8d0c4e0afd0..5cef60799b8 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -104,7 +104,7 @@ typedef struct my_aio_result {
#define ME_HOLDTANG 8 /* Don't delete last keys */
#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */
#define ME_WAITTANG 32 /* Wait for a user action */
-#define ME_NOREFRESH 64 /* Dont refresh screen */
+#define ME_NOREFRESH 64 /* Write the error message to error log */
#define ME_NOINPUT 128 /* Dont use the input libary */
#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
#define ME_COLOUR2 ((2 << ME_HIGHBYTE))
diff --git a/include/my_time.h b/include/my_time.h
index fdfe130c45f..68f9c2e739f 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -50,6 +50,19 @@ typedef long my_time_t;
/* two-digit years < this are 20..; >= this are 19.. */
#define YY_PART_YEAR 70
+/*
+ check for valid times only if the range of time_t is greater than
+ the range of my_time_t
+*/
+#if SIZEOF_TIME_T > 4 || defined(TIME_T_UNSIGNED)
+# define IS_TIME_T_VALID_FOR_TIMESTAMP(x) \
+ ((x) <= TIMESTAMP_MAX_VALUE && \
+ (x) >= TIMESTAMP_MIN_VALUE)
+#else
+# define IS_TIME_T_VALID_FOR_TIMESTAMP(x) \
+ ((x) >= TIMESTAMP_MIN_VALUE)
+#endif
+
/* Flags to str_to_datetime */
#define TIME_FUZZY_DATE 1
#define TIME_DATETIME_ONLY 2