Browse Source

MDEV-25084 Assertion failure when moving equality from having to where

This bug was fixed by the patch for bug MDEV-26402.
Only a test case that failed before this patch was applied is added
in this commit.
pull/3491/head
Igor Babaev 1 year ago
parent
commit
74d7168765
  1. 10
      mysql-test/main/having_cond_pushdown.result
  2. 12
      mysql-test/main/having_cond_pushdown.test

10
mysql-test/main/having_cond_pushdown.result

@ -5187,4 +5187,14 @@ HAVING (SELECT MAX(b) FROM t1) = a AND a > b;
a b
2 1
DROP TABLE t1;
#
# MDEV-25084: Moving equality with constant right side
# from HAVING to WHERE
# (fixed by the patch for MDEV-26402)
#
CREATE TABLE t1 (a CHAR(3)) CHARSET=sjis;
INSERT INTO t1 VALUES ('foo'),('bar');
SELECT LOAD_FILE('') AS f, a FROM t1 GROUP BY f, a HAVING f = a;
f a
DROP TABLE t1;
End of 10.5 tests

12
mysql-test/main/having_cond_pushdown.test

@ -1584,4 +1584,16 @@ eval $q;
DROP TABLE t1;
--echo #
--echo # MDEV-25084: Moving equality with constant right side
--echo # from HAVING to WHERE
--echo # (fixed by the patch for MDEV-26402)
--echo #
CREATE TABLE t1 (a CHAR(3)) CHARSET=sjis;
INSERT INTO t1 VALUES ('foo'),('bar');
SELECT LOAD_FILE('') AS f, a FROM t1 GROUP BY f, a HAVING f = a;
DROP TABLE t1;
--echo End of 10.5 tests
Loading…
Cancel
Save