diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-08-15 19:14:20 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-08-15 19:14:20 +0400 |
commit | 2ef3d37a59bf4a7128c0a1d23e94aed60bffcf07 (patch) | |
tree | bd856c51a987ff5ddf4cf157f8e601b39caf49e8 /mysql-test/main/type_time.result | |
parent | d87c53cb0432670b1ef43c15bf4625813de71c1a (diff) | |
download | mariadb-git-2ef3d37a59bf4a7128c0a1d23e94aed60bffcf07.tar.gz |
MDEV-16971 Assertion `is_valid_value_slow()' failed in Time::adjust_time_range_or_invalidate
The patch for MDEV-16928 added a few new asserts to check that
time, date, datetime values are valid and consistent after initialization.
One of the new asserts caught an improper initialization in
Time::make_from_datetime_with_days_diff()
(the former function calc_datetime_days_diff()).
If the YYYYMM part is not zero after unpack time
we have an out-of-range TIME value.
Diffstat (limited to 'mysql-test/main/type_time.result')
-rw-r--r-- | mysql-test/main/type_time.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/main/type_time.result b/mysql-test/main/type_time.result index 8f50d49d4b9..6d26ee1fdaa 100644 --- a/mysql-test/main/type_time.result +++ b/mysql-test/main/type_time.result @@ -2064,5 +2064,17 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIME'00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(<cache>(TIME'00:00:00.00'),`test`.`t1`.`a`)) DROP TABLE t1; # +# MDEV-16971 Assertion `is_valid_value_slow()' failed in Time::adjust_time_range_or_invalidate +# +SET sql_mode=''; +CREATE TABLE t1 (d1 date, t1 time, KEY t1 (t1)); +INSERT INTO t1 VALUES ('1982-12-19','08:16:31'),('1981-04-19','21:52:59'),('1971-06-09','07:15:44'),('2007-08-15','03:55:02'),('1993-06-05','04:17:51'),('2034-07-01','17:31:12'),('1998-08-24','08:09:27'),('1991-01-15','01:14:07'),('2001-02-25','10:41:28'),('1974-06-24','10:21:58'),('1977-04-21','16:38:05'),('1981-12-03','01:24:42'),('1972-06-15','20:19:16'),('1989-08-10','08:53:47'),('2018-05-19','15:06:49'),('1984-01-12','15:56:11'),('2013-01-23','04:16:16'),('2000-06-10','02:06:44'),('1995-01-03','04:51:38'); +CREATE TABLE t2 (d1 date ); +INSERT INTO t2 VALUES ('2018-06-01'),('1979-10-25'),('1974-08-22'),('1980-06-17'); +SELECT * FROM (t1 JOIN t2 ON (t2.d1 = t1.t1)) WHERE (t1.d1 > 70 ); +d1 t1 d1 +UPDATE (t1 JOIN t2 ON (t2.d1 = t1.t1)) SET t1.d1 = '2018-07-07' WHERE (t1.d1 > 70 ); +DROP TABLE t1,t2; +# # End of 10.4 tests # |