diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-11-20 21:49:25 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2021-11-20 21:49:25 +0400 |
commit | e9f171b4fe65399e9ebbb1660198b690582e2ef5 (patch) | |
tree | ad1e23e9dd8c256a79ee26620533611c6adf5f14 /mysql-test | |
parent | 7efcc2794d698f62074290232e0f71234c7a4b41 (diff) | |
download | mariadb-git-e9f171b4fe65399e9ebbb1660198b690582e2ef5.tar.gz |
MDEV-27098 Subquery using the ALL keyword on TIME columns produces a wrong resultbb-10.2-bar
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_time.result | 12 | ||||
-rw-r--r-- | mysql-test/t/type_time.test | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 90d09ea595f..6e041236ff9 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -1368,5 +1368,17 @@ Warning 1292 Incorrect datetime value: '1995.0000000' Note 1003 select `test`.`t1`.`f` AS `f` from `test`.`t1` where '00:00:00.000000' between `test`.`t1`.`f` and <cache>('23:59:59') DROP TABLE t1; # +# MDEV-27098 Subquery using the ALL keyword on TIME columns produces a wrong result +# +CREATE TABLE t1 (d TIME); +INSERT INTO t1 VALUES ('120:00:00'), ('20:00:00'), ('-120:00:00'), ('-220:00:00'); +SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1); +d +120:00:00 +SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1); +d +-220:00:00 +DROP TABLE t1; +# # End of 10.2 tests # diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index 9ef80cf28fb..7c1a411df37 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -824,5 +824,15 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1995.0000000 BETWEEN f AND '23:59:59'; DROP TABLE t1; --echo # +--echo # MDEV-27098 Subquery using the ALL keyword on TIME columns produces a wrong result +--echo # + +CREATE TABLE t1 (d TIME); +INSERT INTO t1 VALUES ('120:00:00'), ('20:00:00'), ('-120:00:00'), ('-220:00:00'); +SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1); +SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1); +DROP TABLE t1; + +--echo # --echo # End of 10.2 tests --echo # |