Bug #118210 Invisible Index Binlog Replay Bugfix

Submitted: 16 May 2025 10:15 Modified: 18 May 2025 16:42
Reporter: alex xing (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:8.0.42 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[16 May 2025 10:15] alex xing
Description:
Background:
If optimizer_switch="use_invisible_indexes=on", the replay phase could select an invisible index. However, the previous logic did not check this condition.

Fix:
Replace keyinfo->is_visible with table->s->usable_indexes(current_thd).is_set(key).

How to repeat:
just read the code

Suggested fix:
fix as the below patch
[16 May 2025 10:16] alex xing
a simple patch to describe the bugfix

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: invisible_index_bug_fix.patch (application/octet-stream, text), 680 bytes.

[18 May 2025 16:42] MySQL Verification Team
Hello Alex Xing,

Thank you for the report and contribution.

regards,
umesh

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

Page generated in 0.053 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.