Commit 7b9bcaa5 authored by Sergey Petrunya's avatar Sergey Petrunya

MWL#90: Post-merge fixes: add mixing typecasts to remove compiler warnings

parent 6bf60dc3
......@@ -831,7 +831,7 @@ void get_delayed_table_estimates(TABLE *table,
rows *= join->best_positions[i].records_read;
read_time += join->best_positions[i].read_time;
}
*out_rows= rows;
*out_rows= (ha_rows)rows;
*startup_cost= read_time;
/* Calculate cost of scanning the temptable */
double data_size= rows * hash_sj_engine->tmp_table->s->reclength;
......
......@@ -6253,7 +6253,7 @@ get_best_combination(JOIN *join)
sub-order
*/
SJ_MATERIALIZATION_INFO *sjm= cur_pos->table->emb_sj_nest->sj_mat_info;
j->records= j->records_read= sjm->is_sj_scan? sjm->rows : 1;
j->records= j->records_read= (ha_rows)(sjm->is_sj_scan? sjm->rows : 1);
JOIN_TAB *jt= (JOIN_TAB*)join->thd->alloc(sizeof(JOIN_TAB) * sjm->tables);
JOIN_TAB_RANGE *jt_range= new JOIN_TAB_RANGE;
jt_range->start= jt;
......@@ -6303,7 +6303,7 @@ get_best_combination(JOIN *join)
else if (create_ref_for_key(join, j, keyuse, used_tables))
DBUG_RETURN(TRUE); // Something went wrong
loop_end:
j->records_read= join->best_positions[tablenr].records_read;
j->records_read= (ha_rows)join->best_positions[tablenr].records_read;
join->map2table[j->table->tablenr]= j;
// If we've reached the end of sjm nest, switch back to main sequence
......
......@@ -243,7 +243,8 @@ typedef struct st_join_table {
E(#records) is in found_records.
*/
double read_time;
/* psergey-todo: make the below have type double, like POSITION::records_read? */
ha_rows records_read;
/* Startup cost for execution */
......
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