diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-09-19 23:50:32 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-09-21 22:03:28 +0200 |
commit | f8a800bec81983910a96a5dc38f3aeb9b7528bce (patch) | |
tree | 7da12c2d4f832cbf6bf9774a6dbbab88feada0c1 /mysql-test/t/old-mode.test | |
parent | f4f48e06215fe6717865ccbe27ddc388a2cb86b8 (diff) | |
download | mariadb-git-f8a800bec81983910a96a5dc38f3aeb9b7528bce.tar.gz |
bugfix: copy timestamps correctly in INSERT...SELECT
don't do it via MYSQL_TIME, that conversion is lossy
around DST change dates.
Diffstat (limited to 'mysql-test/t/old-mode.test')
-rw-r--r-- | mysql-test/t/old-mode.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test index 99c92f8093d..ed33da523c7 100644 --- a/mysql-test/t/old-mode.test +++ b/mysql-test/t/old-mode.test @@ -86,6 +86,8 @@ SET @@global.mysql56_temporal_format=DEFAULT; # # MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change # + +# Copy_field set time_zone='Europe/Moscow'; set global mysql56_temporal_format=false; create table t1 (a timestamp); @@ -99,4 +101,19 @@ select a, unix_timestamp(a) from t1; alter table t1 modify a timestamp; select a, unix_timestamp(a) from t1; drop table t1; + +# field_conv_incompatible() +set global mysql56_temporal_format=false; +create table t1 (a timestamp); +set timestamp=1288477526; +insert t1 values (null); +set timestamp=1288481126; +insert t1 values (null); +select a, unix_timestamp(a) from t1; +set global mysql56_temporal_format=true; +select a, unix_timestamp(a) from t1; +create table t2 (a timestamp); +insert t2 select a from t1; +select a, unix_timestamp(a) from t2; +drop table t1, t2; set time_zone=DEFAULT; |