summaryrefslogtreecommitdiff
path: root/mysql-test/main/type_date.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-04-20 00:11:50 +0400
committerAlexander Barkov <bar@mariadb.com>2019-04-20 00:11:50 +0400
commitf4019f5b3544a18f3ddf32df2c5214c3f8dabdce (patch)
tree97e7ccb321e0b276a5351666f32577395834e962 /mysql-test/main/type_date.test
parent42c58b87da01fdf41ae5aa0d41af226d41096262 (diff)
downloadmariadb-git-f4019f5b3544a18f3ddf32df2c5214c3f8dabdce.tar.gz
Backporting from 10.4 to 10.3: MDEV-17325 NULL-ability problems with LEAST() in combination with NO_ZERO_DATE and NO_ZERO_IN_DATE
This also fixes: MDEV-17299 Assertion `maybe_null' failed in make_sortkey Note, during merge of the 10.1 version of MDEV-17299, please use the 10.3 version of the code (i.e. null merge the 10.1 version).
Diffstat (limited to 'mysql-test/main/type_date.test')
-rw-r--r--mysql-test/main/type_date.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/type_date.test b/mysql-test/main/type_date.test
index 8d29a54a26c..befee57183d 100644
--- a/mysql-test/main/type_date.test
+++ b/mysql-test/main/type_date.test
@@ -591,6 +591,20 @@ INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24');
SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END;
DROP TABLE t1;
+--echo #
+--echo # MDEV-17299 Assertion `maybe_null' failed in make_sortkey
+--echo #
+
+CREATE TABLE t1 (pk int NOT NULL, d1 date, d2 date NOT NULL);
+INSERT INTO t1 values (1,'2018-06-22','2018-06-22'),(2,'2018-07-11','2018-07-11');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT group_concat(d1/(CASE 'b' WHEN 'j' THEN 'c' END))
+ FROM v1 GROUP BY greatest(pk, 0, d2);
+CREATE TABLE t2 AS SELECT greatest(pk, 0, d2) AS c1 FROM t1 LIMIT 0;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP VIEW v1;
+DROP TABLE t1;
--echo #
--echo # End of 10.1 tests