Bug #121460 Inconsistant result after modifying optimizer_switch while using binary

Submitted: 9 Oct 0:54
Reporter: Jiyuan Li Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:|26.10.0-cluster OS:Ubuntu (24.04)
Assigned to: CPU Architecture:Any

[9 Oct 0:54] Jiyuan Li
Description:
Queries in following testcase return different results before/after modifying optimizer_switch

How to repeat:
SET SESSION sql_mode='';
CREATE TABLE t (id INT PRIMARY KEY, b BINARY(4)) ENGINE=NDB;
INSERT INTO t VALUES (1,'ab'),(2,'cd'),(3,'ab\0\0');
SET SESSION optimizer_switch='engine_condition_pushdown=on';
SELECT id, HEX(b) FROM t WHERE b = 0x6162;
+----+----------+
| id | HEX(b)   |
+----+----------+
|  3 | 61620000 |
|  1 | 61620000 |
+----+----------+
SET SESSION optimizer_switch='engine_condition_pushdown=off';
SELECT id, HEX(b) FROM t WHERE b = 0x6162;
-- Empty set

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.047 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.