From 5b678d9ea4aa3b5ed4c030a9bb5e7d15c3ff8804 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Sun, 28 Mar 2021 23:45:04 +0300 Subject: [PATCH] MDEV-25251: main.derived_split_innodb fails on ICC release binary The code compares two query plans with identical costs, the plan with lateral is the same as one without. Introduce a small difference to cost numbers to prefer non-lateral plan in this case. --- sql/opt_split.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/opt_split.cc b/sql/opt_split.cc index 2aa65bdf03b..797401c9b42 100644 --- a/sql/opt_split.cc +++ b/sql/opt_split.cc @@ -996,7 +996,7 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(double record_count, } if (spl_plan) { - if(record_count * spl_plan->cost < spl_opt_info->unsplit_cost) + if(record_count * spl_plan->cost < spl_opt_info->unsplit_cost - 0.01) { /* The best plan that employs splitting is cheaper than