Skip to content

Commit f2c4180

Browse files
committed
Fix a typo in get_best_ror_intersect
cpk_scan should not be used if using it increases the cost of the query plan.
1 parent f61909e commit f2c4180

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/opt_range.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6529,6 +6529,8 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree,
65296529
if (ror_intersect_add(intersect, cpk_scan, TRUE) &&
65306530
(intersect->total_cost < min_cost))
65316531
intersect_best= intersect; //just set pointer here
6532+
else
6533+
cpk_scan= 0; // Don't use cpk_scan
65326534
}
65336535
else
65346536
cpk_scan= 0; // Don't use cpk_scan

0 commit comments

Comments
 (0)