Commit 74d71687 authored by Igor Babaev's avatar Igor Babaev

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.
parent 9091afdc
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment