Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä 2020-05-04 18:43:00 +03:00
commit 4337a3b5f9
15 changed files with 180 additions and 43 deletions

View file

@ -8229,6 +8229,37 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.semijoin_table_pullout'))
]
drop table t1,t2,t3;
#
# MDEV-22401: Optimizer trace: multi-component range is not printed correctly
#
create table t1 (kp1 int, kp2 int, key(kp1, kp2));
insert into t1 values (1,1),(1,5),(5,1),(5,5);
set optimizer_trace=1;
select * from t1 force index(kp1) where (kp1=2 and kp2 >=4);
kp1 kp2
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives'))
[
[
{
"index": "kp1",
"ranges":
[
"(2,4) <= (kp1,kp2) <= (2)"
],
"rowid_ordered": false,
"using_mrr": false,
"index_only": true,
"rows": 1,
"cost": 0.345829876,
"chosen": true
}
]
]
drop table t1;
# End of 10.4 tests
#
# Test many rows to see output of big cost numbers
#
select count(*) from seq_1_to_10000000;
@ -8326,4 +8357,5 @@ select count(*) from seq_1_to_10000000 {
}
]
} 0 0
# End of 10.5 tests
set optimizer_trace='enabled=off';