diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-05-22 17:13:15 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-05-22 17:13:15 +0400 |
commit | 9b79888df82259743284501af5b156a18edc427f (patch) | |
tree | 3b73541947210fb515f61db1c630ef7a05b200ed /mysql-test/r | |
parent | c84bbeda7f42e940553aee5377f64d2452872138 (diff) | |
download | mariadb-git-9b79888df82259743284501af5b156a18edc427f.tar.gz |
MDEV-12866 Out-of-range error with CREATE..SELECT..TO_SECONDS(NOW())
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/func_time.result | 12 | ||||
-rw-r--r-- | mysql-test/r/metadata.result | 2 | ||||
-rw-r--r-- | mysql-test/r/partition_column.result | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 50ea5e207bf..fb0179026c9 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -3282,3 +3282,15 @@ DROP TABLE t2; DROP VIEW v1; DROP TABLE t1; SET sql_mode=DEFAULT; +# +# MDEV-12866 Out-of-range error with CREATE..SELECT..TO_SECONDS(NOW()) +# +SET sql_mode=STRICT_ALL_TABLES; +CREATE TABLE t1 AS SELECT TO_SECONDS('9999-12-31 23:59:59'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `TO_SECONDS('9999-12-31 23:59:59')` bigint(12) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET sql_mode=DEFAULT; diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index b588a6a9525..7e57fa74663 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -476,7 +476,7 @@ def PERIOD_DIFF(200802,200703) 3 6 2 N 32897 0 63 def TO_DAYS('2007-10-07') 3 6 6 Y 32896 0 63 def DAYOFMONTH('2007-02-03') 3 2 1 Y 32896 0 63 def DAYOFWEEK('2007-02-03') 3 1 1 Y 32896 0 63 -def TO_SECONDS('2013-06-13') 3 6 11 Y 32896 0 63 +def TO_SECONDS('2013-06-13') 8 12 11 Y 32896 0 63 PERIOD_ADD(200801,2) PERIOD_DIFF(200802,200703) TO_DAYS('2007-10-07') DAYOFMONTH('2007-02-03') DAYOFWEEK('2007-02-03') TO_SECONDS('2013-06-13') 200803 11 733321 3 7 63538300800 SELECT diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 3df31078a50..cba1e283474 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -542,7 +542,7 @@ create table t1 as select to_seconds(null) as to_seconds; select data_type from information_schema.columns where table_schema='test' and column_name='to_seconds'; data_type -int +bigint drop table t1; create table t1 (a int, b int) partition by list columns(a,b) |