394ad895ec
64-bit archs and apply a patch from upstream to properly fix the regression. from Brad (maintainer)
17 lines
669 B
Plaintext
17 lines
669 B
Plaintext
$OpenBSD: patch-sql_set_var_cc,v 1.2 2011/01/11 11:03:03 ajacoutot Exp $
|
|
--- sql/set_var.cc.orig Mon Nov 29 05:37:59 2010
|
|
+++ sql/set_var.cc Fri Jan 7 20:05:58 2011
|
|
@@ -2718,7 +2718,11 @@ bool sys_var_timestamp::check(THD *thd, set_var *var)
|
|
time_t val;
|
|
var->save_result.ulonglong_value= var->value->val_int();
|
|
val= (time_t) var->save_result.ulonglong_value;
|
|
- if (val < (time_t) MY_TIME_T_MIN || val > (time_t) MY_TIME_T_MAX)
|
|
+ if ((val < TIMESTAMP_MIN_VALUE)
|
|
+#if SIZEOF_TIME_T > 4
|
|
+ || (val > TIMESTAMP_MAX_VALUE)
|
|
+#endif
|
|
+ )
|
|
{
|
|
my_message(ER_UNKNOWN_ERROR,
|
|
"This version of MySQL doesn't support dates later than 2038",
|