diff options
author | Igor Babaev <igor@askmonty.org> | 2019-02-06 15:56:21 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-02-06 15:56:21 -0800 |
commit | 9e114455a95c15cd1e37dabef0dff1fe2588d50a (patch) | |
tree | 3852d63e83fa75d27f2a513676745a7a1a2fd82f /sql | |
parent | 447e0f023fff0fa2ccfa7e93b77f1da3be3b43f1 (diff) | |
download | mariadb-git-9e114455a95c15cd1e37dabef0dff1fe2588d50a.tar.gz |
MDEV-16188 Post merge fixes:fixed warnings on Windows
Also adjusted some result files after Galina's last patch for ANALYZE.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 2 | ||||
-rw-r--r-- | sql/multi_range_read.cc | 6 | ||||
-rw-r--r-- | sql/rowid_filter.cc | 7 | ||||
-rw-r--r-- | sql/rowid_filter.h | 2 | ||||
-rw-r--r-- | sql/sql_explain.cc | 3 |
5 files changed, 12 insertions, 8 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 932797a8f37..b1a2719a3cc 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2826,7 +2826,7 @@ double handler::keyread_time(uint index, uint ranges, ha_rows rows) size_t len= table->key_info[index].key_length + ref_length; if (index == table->s->primary_key && table->file->primary_key_is_clustered()) len= table->s->stored_rec_length; - uint keys_per_block= (stats.block_size/2.0/len+1); + uint keys_per_block= (uint) (stats.block_size/2.0/len+1); ulonglong blocks= !rows ? 0 : (rows-1) / keys_per_block + 1; double cost= (double)rows*len/(stats.block_size+1)*IDX_BLOCK_COPY_COST; if (ranges) diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index cab278f5859..12f72f5de45 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -20,7 +20,7 @@ #include "key.h" #include "sql_statistics.h" -static ulonglong key_block_no(handler *h, uint keyno, uint keyentry_pos) +static ulonglong key_block_no(handler *h, uint keyno, ha_rows keyentry_pos) { return (ulonglong) (h->keyread_time(keyno, 1, keyentry_pos + 1) - h->keyread_time(keyno, 0, keyentry_pos + 1) + 0.5) + 1; @@ -217,7 +217,9 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, } else { - cost->io_count= read_time(keyno, total_touched_blocks, (uint) total_rows); + cost->io_count= read_time(keyno, + (uint)total_touched_blocks, + (uint) total_rows); cost->cpu_cost= (double) total_rows / TIME_FOR_COMPARE + 0.01; } } diff --git a/sql/rowid_filter.cc b/sql/rowid_filter.cc index b2349d26843..c899236e336 100644 --- a/sql/rowid_filter.cc +++ b/sql/rowid_filter.cc @@ -64,7 +64,7 @@ void Range_rowid_filter_cost_info::init(Rowid_filter_container_type cont_type, container_type= cont_type; table= tab; key_no= idx; - est_elements= table->quick_rows[key_no]; + est_elements= (ulonglong) (table->quick_rows[key_no]); b= build_cost(container_type); selectivity= est_elements/((double) table->stat_records()); a= avg_access_and_eval_gain_per_row(container_type); @@ -108,7 +108,8 @@ Rowid_filter_container *Range_rowid_filter_cost_info::create_container() switch (container_type) { case SORTED_ARRAY_CONTAINER: - res= new (thd->mem_root) Rowid_filter_sorted_array(est_elements, elem_sz); + res= new (thd->mem_root) Rowid_filter_sorted_array((uint) est_elements, + elem_sz); break; default: DBUG_ASSERT(0); @@ -245,7 +246,7 @@ void TABLE::prune_range_rowid_filters() Return maximum number of elements that a container allowed to have */ -static uint +static ulonglong get_max_range_rowid_filter_elems_for_table( THD *thd, TABLE *tab, Rowid_filter_container_type cont_type) diff --git a/sql/rowid_filter.h b/sql/rowid_filter.h index de50fd36c4c..ddeb13a7091 100644 --- a/sql/rowid_filter.h +++ b/sql/rowid_filter.h @@ -383,7 +383,7 @@ class Range_rowid_filter_cost_info : public Sql_alloc /* The table for which the range filter is to be built (if needed) */ TABLE *table; /* Estimated number of elements in the filter */ - double est_elements; + ulonglong est_elements; /* The cost of building the range filter */ double b; /* diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 0c2f49338fe..fbec10387d8 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -1313,7 +1313,8 @@ int Explain_table_access::print_explain(select_result_sink *output, uint8 explai if (rowid_filter) { rows_str.append(" ("); - rows_str.append_ulonglong(round(rowid_filter->selectivity * 100.0)); + rows_str.append_ulonglong((ulonglong) (round(rowid_filter->selectivity * + 100.0))); rows_str.append("%)"); } item_list.push_back(new (mem_root) |