revision-id: 0f00072a585b7ef02f02aa73b9e622a3b4deacca parent(s): 4461b0f9b301233b245853b9b71b3770c24c5aac committer: Sergei Petrunia branch nick: 10.3-r2 timestamp: 2018-06-15 17:13:31 +0300 message: Fix a typo in get_best_ror_intersect cpk_scan should not be used if using it increases the cost of the query plan. --- sql/opt_range.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 8422917..d3f8acd 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -6529,6 +6529,8 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree, if (ror_intersect_add(intersect, cpk_scan, TRUE) && (intersect->total_cost < min_cost)) intersect_best= intersect; //just set pointer here + else + cpk_scan= 0; // Don't use cpk_scan } else cpk_scan= 0; // Don't use cpk_scan