Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
Can result in unexpected behaviour
-
Q2/2026 Server Development
Description
Issue seen in main.statistics_json
Trace output:
------------------------
Capture : trace1.txt
replay : trace2.txt![]()
Explain:
------------------
explain extended select * from t1_bin where a between 'a-3a' and 'zzzzzzzzz'; |
id select_type table type possible_keys key key_len ref rows filtered Extra |
-1 SIMPLE t1_bin ALL NULL NULL NULL NULL 10 58.82 Using where |
+1 SIMPLE t1_bin ALL NULL NULL NULL NULL 10 10.00 Using where |
How to repro:
set optimizer_record_context=ON; |
|
|
create table ten(a int primary key); |
insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); |
set histogram_size=100; |
set histogram_type='double_prec_hb'; |
create table t1_bin (a varchar(255)); |
insert into t1_bin select concat('a-', a) from ten; |
analyze table t1_bin persistent for all; |
select hex(histogram) from mysql.column_stats where table_name='t1_bin'; |
|
|
explain extended select * from t1_bin where a between 'a-3a' and 'zzzzzzzzz'; |
SELECT context INTO DUMPFILE 'context1.txt' FROM INFORMATION_SCHEMA.OPTIMIZER_CONTEXT; |
source /home/ppandith/test2/bld/data2/m8/context1.txt
|
Attachments
Issue Links
- relates to
-
MDEV-39368 Add mtr --replay-server option to test Optimizer Context Replay
-
- In Progress
-