Bug #117476 Inconsistent result after using optimizer_switch
| Submitted: | 15 Feb 2025 13:10 | Modified: | 18 Feb 2025 13:15 |
|---|---|---|---|
| Reporter: | Jiyuan Li | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 9.1.0-cluster | OS: | Ubuntu (18.04) |
| Assigned to: | CPU Architecture: | x86 |
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 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.
Description: I'm using optimizer_switch on my query but I found there will be inconsistent result when I turn on subquery_to_derived. How to repeat: CREATE TABLE IF NOT EXISTS t0(c0 INT(250) COLUMN_FORMAT FIXED UNIQUE ) ; INSERT INTO t0(c0) VALUES(1); SET session optimizer_switch = 'subquery_to_derived=off'; SELECT ALL t0.c0 AS ref0 FROM t0 WHERE (t0.c0) = (IF('NV^', -829310709, 0.9295736101912976)) ; SET session optimizer_switch = 'subquery_to_derived=on'; SELECT ALL t0.c0 AS ref0 FROM t0 WHERE (t0.c0) = (IF('NV^', -829310709, 0.9295736101912976));