Bug #120574 Range optimizer exceeds memory limit and chooses bad range plan for large IN lists
Submitted: 29 May 14:05
Reporter: Qingping Zhu Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S2 (Serious)
Version:8.0.41 OS:Any
Assigned to: CPU Architecture:Any
Tags: Memory, Optimizer, performance, range_optimizer_max_mem_size, range-optimizer

File: Maximum allowed size is 50MB.
Description:
Privacy:

If the data you need to attach is more than 50MB, you should create a compressed archive of the data, split it to 50MB chunks, and upload each of them as a separate attachment.

To split a large file:

[29 May 14:10] Qingping Zhu
Self-contained reduced repro script.

Attachment: single_sql_range_mem_repro.sql (application/octet-stream, text), 2.77 KiB.

[29 May 14:12] Qingping Zhu
Prototype patch for this issue

Attachment: 0001-range-optimizer-mem-guard-v1.patch (application/octet-stream, text), 3.13 KiB.