diff options
author | unknown <dlenev@mysql.com> | 2004-11-03 17:59:03 +0000 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2004-11-03 17:59:03 +0000 |
commit | d259ba4006a683e953486191d2851ee6c63f66b7 (patch) | |
tree | 19189bd6aebd643a3d14a5e47ce221a80424acb9 /mysql-test/r/timezone3.result | |
parent | 9c06c80dff5744ac0b1d214404c9d16f752e41bb (diff) | |
download | mariadb-git-d259ba4006a683e953486191d2851ee6c63f66b7.tar.gz |
Fix for bug #6387 "Queried timestamp values do not match the inserted
value if server runs in time zone with leap seconds".
Now in my_gmt_sec() function we take into account difference between
our target and estimation in seconds part.
mysql-test/Makefile.am:
Added mysql-test/std_data/Moscow_leap reuired by new timezone3.test
to source distribution.
sql/time.cc:
my_gmt_sec():
When comparing our target broken-down datetime t value and proper
representation of our estimation *l_time we should take into account
that they could differ in second part if we have time zone leap seconds.
Also added comments about some assumptions used in this function.
Diffstat (limited to 'mysql-test/r/timezone3.result')
-rw-r--r-- | mysql-test/r/timezone3.result | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/timezone3.result b/mysql-test/r/timezone3.result new file mode 100644 index 00000000000..2135dd33511 --- /dev/null +++ b/mysql-test/r/timezone3.result @@ -0,0 +1,41 @@ +drop table if exists t1; +create table t1 (i int, c varchar(20)); +insert into t1 values +(unix_timestamp("2004-01-01 00:00:00"), "2004-01-01 00:00:00"); +insert into t1 values +(unix_timestamp("2004-03-28 01:59:59"), "2004-03-28 01:59:59"), +(unix_timestamp("2004-03-28 02:30:00"), "2004-03-28 02:30:00"), +(unix_timestamp("2004-03-28 03:00:00"), "2004-03-28 03:00:00"); +insert into t1 values +(unix_timestamp('2004-05-01 00:00:00'),'2004-05-01 00:00:00'); +insert into t1 values +(unix_timestamp('2004-10-31 01:00:00'),'2004-10-31 01:00:00'), +(unix_timestamp('2004-10-31 02:00:00'),'2004-10-31 02:00:00'), +(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59'), +(unix_timestamp('2004-10-31 04:00:00'),'2004-10-31 04:00:00'), +(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59'); +insert into t1 values +(unix_timestamp('1981-07-01 03:59:59'),'1981-07-01 03:59:59'), +(unix_timestamp('1981-07-01 04:00:00'),'1981-07-01 04:00:00'); +select i, from_unixtime(i), c from t1; +i from_unixtime(i) c +1072904422 2004-01-01 00:00:00 2004-01-01 00:00:00 +1080428421 2004-03-28 01:59:59 2004-03-28 01:59:59 +1080428422 2004-03-28 03:00:00 2004-03-28 02:30:00 +1080428422 2004-03-28 03:00:00 2004-03-28 03:00:00 +1083355222 2004-05-01 00:00:00 2004-05-01 00:00:00 +1099170022 2004-10-31 01:00:00 2004-10-31 01:00:00 +1099177222 2004-10-31 02:00:00 2004-10-31 02:00:00 +1099180821 2004-10-31 02:59:59 2004-10-31 02:59:59 +1099184422 2004-10-31 04:00:00 2004-10-31 04:00:00 +1099180821 2004-10-31 02:59:59 2004-10-31 02:59:59 +362793608 1981-07-01 03:59:59 1981-07-01 03:59:59 +362793610 1981-07-01 04:00:00 1981-07-01 04:00:00 +drop table t1; +create table t1 (ts timestamp); +insert into t1 values (19730101235900), (20040101235900); +select * from t1; +ts +19730101235900 +20040101235900 +drop table t1; |