[MDEV-8816] Equal field propagation is not applied for WHERE varbinary_column>=_utf8'a' COLLATE utf8_general_ci AND varbinary_column='A'; Created: 2015-09-18  Updated: 2016-01-11  Resolved: 2015-09-18

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.1.8

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: propagation

Issue Links:
Blocks
blocks MDEV-8728 Fix a number of problems in equal fie... Closed

 Description   

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a VARBINARY(10));
INSERT INTO t1 VALUES ('a'),('A');
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a>=_utf8'a' COLLATE utf8_general_ci AND a='A';
SHOW WARNINGS;

returns

+-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Note  | 1003 | select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'A') and (convert(`test`.`t1`.`a` using utf8) >= <cache>((_utf8'a' collate utf8_general_ci)))) |
+-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

The equality a='A' was not propagated into >=. It safely could.


Generated at Thu Feb 08 07:30:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.