Commit 8607be22 authored by unknown's avatar unknown

Fix date conversion on 32-bit machines.


sql/field.cc:
  Fix type of temporary variables for handling result of
  number_to_datetime().
parent b6823b66
...@@ -4543,7 +4543,7 @@ int Field_timestamp::store(longlong nr) ...@@ -4543,7 +4543,7 @@ int Field_timestamp::store(longlong nr)
THD *thd= table->in_use; THD *thd= table->in_use;
/* We don't want to store invalid or fuzzy datetime values in TIMESTAMP */ /* We don't want to store invalid or fuzzy datetime values in TIMESTAMP */
long tmp= number_to_datetime(nr, &l_time, (thd->variables.sql_mode & longlong tmp= number_to_datetime(nr, &l_time, (thd->variables.sql_mode &
MODE_NO_ZERO_DATE) | MODE_NO_ZERO_DATE) |
MODE_NO_ZERO_IN_DATE, &error); MODE_NO_ZERO_IN_DATE, &error);
if (tmp < 0) if (tmp < 0)
...@@ -5389,7 +5389,7 @@ int Field_newdate::store(double nr) ...@@ -5389,7 +5389,7 @@ int Field_newdate::store(double nr)
int Field_newdate::store(longlong nr) int Field_newdate::store(longlong nr)
{ {
TIME l_time; TIME l_time;
long tmp; longlong tmp;
int error; int error;
if ((tmp= number_to_datetime(nr, &l_time, if ((tmp= number_to_datetime(nr, &l_time,
(TIME_FUZZY_DATE | (TIME_FUZZY_DATE |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment