Commit 07b0d1a3 authored by Monty's avatar Monty Committed by Sergei Petrunia

Adjusted Range_rowid_filter_cost_info lookup cost slightly.

If the array size would be 1, the cost would be 0 which is wrong.
Fixed by adding a small (0.001) base value to the lookup cost.

This causes not changes in any result files.
parent 987fcf91
...@@ -29,7 +29,8 @@ lookup_cost(Rowid_filter_container_type cont_type) ...@@ -29,7 +29,8 @@ lookup_cost(Rowid_filter_container_type cont_type)
{ {
switch (cont_type) { switch (cont_type) {
case SORTED_ARRAY_CONTAINER: case SORTED_ARRAY_CONTAINER:
return log(est_elements)*0.01; /* The addition is here to take care of arrays with 1 element */
return log(est_elements)*0.01+0.001;
default: default:
DBUG_ASSERT(0); DBUG_ASSERT(0);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment