Commit 2a79abcd authored by Sergei Petrunia's avatar Sergei Petrunia

Fix compile on Windows

parent 95698097
...@@ -29698,7 +29698,7 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab, ...@@ -29698,7 +29698,7 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab,
if (kp > 0) if (kp > 0)
{ {
ha_rows ref_rows; double ref_rows;
/* /*
Two possible cases: Two possible cases:
1. ref(const) uses the same #key parts as range access. 1. ref(const) uses the same #key parts as range access.
...@@ -29708,17 +29708,17 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab, ...@@ -29708,17 +29708,17 @@ static bool get_range_limit_read_cost(const JOIN_TAB *tab,
if (kp == table->opt_range[keynr].key_parts) if (kp == table->opt_range[keynr].key_parts)
ref_rows= best_rows; ref_rows= best_rows;
else else
ref_rows= (ha_rows) table->key_info[keynr].actual_rec_per_key(kp-1); ref_rows= table->key_info[keynr].actual_rec_per_key(kp-1);
if (ref_rows > 0) if (ref_rows > 0)
{ {
double tmp= cost_for_index_read(tab->join->thd, table, keynr, double tmp= cost_for_index_read(tab->join->thd, table, keynr,
ref_rows, (ha_rows) ref_rows,
(ha_rows) tab->worst_seeks); (ha_rows) tab->worst_seeks);
if (tmp < best_cost) if (tmp < best_cost)
{ {
best_cost= tmp; best_cost= tmp;
best_rows= (double)ref_rows; best_rows= ref_rows;
} }
} }
} }
......
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