diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-08-11 06:47:48 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-08-11 06:47:48 +0400 |
commit | 2085f14a8dddf175765d97dcb5306bc2a0578b00 (patch) | |
tree | 24979de5af9a1fef91752d548be6a296e68338c1 /mysql-test/main/type_time.result | |
parent | 2966c1e422866f48b68e109ac9e27d52be77fb60 (diff) | |
download | mariadb-git-2085f14a8dddf175765d97dcb5306bc2a0578b00.tar.gz |
MDEV-16938 Move Item::get_time_with_conversion() to Time
The affected code is well covered by tests for MDEV-8766.
Adding only the missing part: the old mode OLD_MODE_ZERO_DATE_TIME_CAST
in combination with 0000-MM-00 and YYYY-00-00.
The old mode in combination with 0000-00-DD was already covered,
so was the new mode with all types of DATETIME values.
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 51b2aecaa6b..8f50d49d4b9 100644 --- a/mysql-test/main/type_time.result +++ b/mysql-test/main/type_time.result @@ -841,6 +841,18 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-00-01 10:20:30' and octet_length(`test`.`t1`.`a`) = 30 + rand() +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a=TIMESTAMP'0000-01-00 10:20:30' AND LENGTH(a)=8; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-01-00 10:20:30' and octet_length(`test`.`t1`.`a`) = 8 +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE a=TIMESTAMP'0001-00-00 10:20:30' AND LENGTH(a)=8; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0001-00-00 10:20:30' and octet_length(`test`.`t1`.`a`) = 8 # Old mode, TIMESTAMP-alike string literal, zero YYYYMMDD, Ok to propagate SELECT * FROM t1 WHERE a='0000-00-00 10:20:30'; a |