summaryrefslogtreecommitdiff
path: root/mysql-test/main/timezone2.result
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-12 17:20:23 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-12 17:20:23 +0200
commitc51f85f8823a845cd4a6aa1b2aa5af18484b2ab0 (patch)
tree65c45f6100c13dad90c33b86dc68be268139b0b8 /mysql-test/main/timezone2.result
parenta89f199c64a1d2339de7c167ce64ec148061a4d3 (diff)
parent8ce702aa90c174566f4ac950e85cc7570bf9b647 (diff)
downloadmariadb-git-c51f85f8823a845cd4a6aa1b2aa5af18484b2ab0.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/main/timezone2.result')
-rw-r--r--mysql-test/main/timezone2.result33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/main/timezone2.result b/mysql-test/main/timezone2.result
index 096e996bffb..c4d13f6c678 100644
--- a/mysql-test/main/timezone2.result
+++ b/mysql-test/main/timezone2.result
@@ -332,3 +332,36 @@ NULL
#
# End of 5.3 tests
#
+#
+# Start of 10.1 tests
+#
+#
+# MDEV-11895 NO_ZERO_DATE affects timestamp values without any warnings
+#
+SET sql_mode = '';
+CREATE TABLE t1 (a TIMESTAMP NULL) ENGINE = MyISAM;
+CREATE TABLE t2 (a TIMESTAMP NULL) ENGINE = MyISAM;
+CREATE TABLE t3 (a TIMESTAMP NULL) ENGINE = MyISAM;
+SET @@session.time_zone = 'UTC';
+INSERT INTO t1 VALUES ('2011-10-29 23:00:00');
+INSERT INTO t1 VALUES ('2011-10-29 23:00:01');
+INSERT INTO t1 VALUES ('2011-10-29 23:59:59');
+SET @@session.time_zone = 'Europe/Moscow';
+SET sql_mode='NO_ZERO_DATE';
+INSERT INTO t2 SELECT * FROM t1;
+SET sql_mode='';
+INSERT INTO t3 SELECT * FROM t1;
+SELECT UNIX_TIMESTAMP(a), a FROM t2;
+UNIX_TIMESTAMP(a) a
+1319929200 2011-10-30 02:00:00
+1319929201 2011-10-30 02:00:01
+1319932799 2011-10-30 02:59:59
+SELECT UNIX_TIMESTAMP(a), a FROM t3;
+UNIX_TIMESTAMP(a) a
+1319929200 2011-10-30 02:00:00
+1319929201 2011-10-30 02:00:01
+1319932799 2011-10-30 02:59:59
+DROP TABLE t1, t2, t3;
+#
+# End of 10.1 tests
+#