Commit d42c472e authored by unknown's avatar unknown

Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-5.0

into  selena.:H:/MYSQL/src/#15634-mysql-5.0


sql/field.cc:
  Auto merged
parents e6d7f242 f778f3ca
...@@ -5239,7 +5239,7 @@ int Field_date::store(double nr) ...@@ -5239,7 +5239,7 @@ int Field_date::store(double nr)
else else
tmp= (longlong) rint(nr); tmp= (longlong) rint(nr);
return Field_date::store(tmp); return Field_date::store(tmp, TRUE);
} }
...@@ -5261,6 +5261,9 @@ int Field_date::store(longlong nr, bool unsigned_val) ...@@ -5261,6 +5261,9 @@ int Field_date::store(longlong nr, bool unsigned_val)
error= 2; error= 2;
} }
if (nr >= 19000000000000.0 && nr <= 99991231235959.0)
nr=floor(nr/1000000.0); // Timestamp to date
if (error) if (error)
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN, set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
error == 2 ? ER_WARN_DATA_OUT_OF_RANGE : error == 2 ? ER_WARN_DATA_OUT_OF_RANGE :
......
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