Commit 157d130a authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix some conversion warnings.

parent 298c56cd
......@@ -4756,7 +4756,7 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
unique_calc_buff_size=
Unique::get_cost_calc_buff_size((ulong)non_cpk_scan_records,
param->table->file->ref_length,
param->thd->variables.sortbuff_size);
(size_t)param->thd->variables.sortbuff_size);
if (param->imerge_cost_buff_size < unique_calc_buff_size)
{
if (!(param->imerge_cost_buff= (uint*)alloc_root(param->mem_root,
......@@ -4768,7 +4768,7 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
imerge_cost +=
Unique::get_use_cost(param->imerge_cost_buff, (uint)non_cpk_scan_records,
param->table->file->ref_length,
param->thd->variables.sortbuff_size,
(size_t)param->thd->variables.sortbuff_size,
TIME_FOR_COMPARE_ROWID,
FALSE, NULL);
DBUG_PRINT("info",("index_merge total cost: %g (wanted: less then %g)",
......@@ -5021,7 +5021,7 @@ typedef struct st_common_index_intersect_info
PARAM *param; /* context info for range optimizations */
uint key_size; /* size of a ROWID element stored in Unique object */
uint compare_factor; /* 1/compare - cost to compare two ROWIDs */
ulonglong max_memory_size; /* maximum space allowed for Unique objects */
size_t max_memory_size; /* maximum space allowed for Unique objects */
ha_rows table_cardinality; /* estimate of the number of records in table */
double cutoff_cost; /* discard index intersects with greater costs */
INDEX_SCAN_INFO *cpk_scan; /* clustered primary key used in intersection */
......@@ -5216,7 +5216,7 @@ bool prepare_search_best_index_intersect(PARAM *param,
common->param= param;
common->key_size= table->file->ref_length;
common->compare_factor= TIME_FOR_COMPARE_ROWID;
common->max_memory_size= param->thd->variables.sortbuff_size;
common->max_memory_size= (size_t)param->thd->variables.sortbuff_size;
common->cutoff_cost= cutoff_cost;
common->cpk_scan= NULL;
common->table_cardinality=
......@@ -5652,7 +5652,7 @@ bool check_index_intersect_extension(PARTIAL_INDEX_INTERSECT_INFO *curr,
uint *buff_elems= common_info->buff_elems;
uint key_size= common_info->key_size;
uint compare_factor= common_info->compare_factor;
ulonglong max_memory_size= common_info->max_memory_size;
size_t max_memory_size= common_info->max_memory_size;
records_sent_to_unique+= ext_index_scan_records;
cost= Unique::get_use_cost(buff_elems, (size_t) records_sent_to_unique, key_size,
......
......@@ -5235,7 +5235,7 @@ void THD::inc_status_sort_range()
void THD::inc_status_sort_rows(ha_rows count)
{
statistic_add(status_var.filesort_rows_, (ha_rows)count, &LOCK_status);
statistic_add(status_var.filesort_rows_, (ulong)count, &LOCK_status);
#ifdef HAVE_PSI_STATEMENT_INTERFACE
PSI_STATEMENT_CALL(inc_statement_sort_rows)(m_statement_psi, (ulong)count);
#endif
......
......@@ -794,7 +794,7 @@ l
Delete multiple tables from join
***************************************************************************/
#define MEM_STRIP_BUF_SIZE current_thd->variables.sortbuff_size
#define MEM_STRIP_BUF_SIZE (size_t)(current_thd->variables.sortbuff_size)
extern "C" int refpos_order_cmp(void* arg, const void *a,const void *b)
{
......
......@@ -2437,7 +2437,7 @@ class thread_info :public ilink {
size_t size __attribute__((unused)))
{ TRASH(ptr, size); }
ulong thread_id;
my_thread_id thread_id;
uint32 os_thread_id;
ulonglong start_time;
uint command;
......@@ -2611,7 +2611,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
while ((thd_info=thread_infos.get()))
{
protocol->prepare_for_resend();
protocol->store((ulonglong) thd_info->thread_id);
protocol->store(thd_info->thread_id);
protocol->store(thd_info->user, system_charset_info);
protocol->store(thd_info->host, system_charset_info);
protocol->store(thd_info->db, system_charset_info);
......@@ -6487,7 +6487,7 @@ static bool store_trigger(THD *thd, Trigger *trigger,
{
table->field[16]->set_notnull();
thd->variables.time_zone->gmt_sec_to_TIME(&timestamp,
trigger->create_time/100);
(my_time_t)(trigger->create_time/100));
/* timestamp is with 6 digits */
timestamp.second_part= (trigger->create_time % 100) * 10000;
((Field_temporal_with_date*) table->field[16])->store_time_dec(&timestamp,
......@@ -9498,7 +9498,7 @@ static bool show_create_trigger_impl(THD *thd, Trigger *trigger)
{
MYSQL_TIME timestamp;
thd->variables.time_zone->gmt_sec_to_TIME(&timestamp,
trigger->create_time/100);
(my_time_t)(trigger->create_time/100));
timestamp.second_part= (trigger->create_time % 100) * 10000;
p->store(&timestamp, 2);
}
......
......@@ -68,7 +68,7 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
}
}
else
block_length= share->key_cache->param_block_size;
block_length= (size_t)share->key_cache->param_block_size;
length= info->preload_buff_size/block_length * block_length;
set_if_bigger(length, block_length);
......
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