Commit 20291639 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-8742 Wrong result for SELECT..WHERE view_latin1_swedish_ci_field='a' COLLATE latin1_bin

The fix for MDEV-8749 also fixed MDEV-8742.
Just adding the test case from the bug report.
parent bf7a2bb1
......@@ -5643,5 +5643,16 @@ a
DROP VIEW v1;
DROP TABLE t1;
#
# MDEV-8742 Wrong result for SELECT..WHERE view_latin1_swedish_ci_field='a' COLLATE latin1_bin
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1);
INSERT INTO t1 VALUES ('a'),('A');
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a='a';
SELECT * FROM v1 WHERE a=_latin1'a' COLLATE latin1_bin;
a
a
DROP VIEW v1;
DROP TABLE t1;
#
# End of 10.1 tests
#
......@@ -5503,6 +5503,17 @@ SELECT * FROM v1 WHERE a='5' AND a<2;
DROP VIEW v1;
DROP TABLE t1;
--echo #
--echo # MDEV-8742 Wrong result for SELECT..WHERE view_latin1_swedish_ci_field='a' COLLATE latin1_bin
--echo #
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1);
INSERT INTO t1 VALUES ('a'),('A');
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a='a';
SELECT * FROM v1 WHERE a=_latin1'a' COLLATE latin1_bin;
DROP VIEW v1;
DROP TABLE t1;
--echo #
--echo # End of 10.1 tests
--echo #
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