mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
Merge mysql.com:/home/kostja/mysql/tmp_merge
into mysql.com:/home/kostja/mysql/mysql-5.1-merge
This commit is contained in:
commit
e656863033
1 changed files with 4 additions and 1 deletions
|
@ -5243,7 +5243,7 @@ int Field_date::store(double nr)
|
|||
else
|
||||
tmp= (longlong) rint(nr);
|
||||
|
||||
return Field_date::store(tmp);
|
||||
return Field_date::store(tmp, TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5265,6 +5265,9 @@ int Field_date::store(longlong nr, bool unsigned_val)
|
|||
error= 2;
|
||||
}
|
||||
|
||||
if (nr >= 19000000000000.0 && nr <= 99991231235959.0)
|
||||
nr=floor(nr/1000000.0); // Timestamp to date
|
||||
|
||||
if (error)
|
||||
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
error == 2 ? ER_WARN_DATA_OUT_OF_RANGE :
|
||||
|
|
Loading…
Add table
Reference in a new issue