Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL)
Description
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a ENUM('a','A') COLLATE latin1_bin);
|
INSERT INTO t1 VALUES ('a'),('A');
|
SELECT * FROM t1 WHERE a='a ';
|
SELECT * FROM t1 WHERE HEX(a)='61';
|
SELECT * FROM t1 WHERE HEX(a)='61' AND a='a ';
|
The first and the second query correctly return one row.
The third query erroneously returns empty set.
Notice, trailing space in the constant 'a '.
The same problem is repeatable with SET:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a SET('a','A') COLLATE latin1_bin);
|
INSERT INTO t1 VALUES ('a'),('A');
|
SELECT * FROM t1 WHERE a='a ';
|
SELECT * FROM t1 WHERE HEX(a)='61';
|
SELECT * FROM t1 WHERE HEX(a)='61' AND a='a ';
|
Attachments
Issue Links
- blocks
-
MDEV-8728 Fix a number of problems in equal field and equal expression propagation
- Closed