mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed problem with mysql prompt when server disconnect. (Bug 356)
Fixed problem with localtime -> gmt where some times resulted in different (but correct) timestamps. Now MySQL should use the smallest possible timestamp value in this case. (Bug 316) client/mysql.cc: Fixed problem with prompt when server disconnect. (Bug 356) client/mysqltest.c: More debug information mysql-test/mysql-test-run.sh: Added support for --timezone in -master.opt mysql-test/t/raid.test: Fixed test if raid is enabled sql/field.cc: New my_gmt_sec() parameters sql/mysql_priv.h: New my_gmt_sec() parameters sql/mysqld.cc: Remove LOCK_timezone. Code cleanup sql/time.cc: Fixed problem with localtime -> gmt where some times resulted in different (but correct) timestamps. Now MySQL should use the smallest possible timestamp value in this case. (Bug 316)
This commit is contained in:
@ -2552,6 +2552,7 @@ void Field_timestamp::store(longlong nr)
|
||||
|
||||
if ((nr=fix_datetime(nr)))
|
||||
{
|
||||
long not_used;
|
||||
part1=(long) (nr/LL(1000000));
|
||||
part2=(long) (nr - (longlong) part1*LL(1000000));
|
||||
l_time.year= (int) (part1/10000L); part1%=10000L;
|
||||
@ -2560,7 +2561,7 @@ void Field_timestamp::store(longlong nr)
|
||||
l_time.hour= (int) (part2/10000L); part2%=10000L;
|
||||
l_time.minute=(int) part2 / 100;
|
||||
l_time.second=(int) part2 % 100;
|
||||
timestamp=my_gmt_sec(&l_time);
|
||||
timestamp=my_gmt_sec(&l_time, ¬_used);
|
||||
}
|
||||
else
|
||||
timestamp=0;
|
||||
|
Reference in New Issue
Block a user