diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_sum.cc | 4 | ||||
-rw-r--r-- | sql/item_sum.h | 2 | ||||
-rw-r--r-- | sql/opt_range.cc | 2 | ||||
-rw-r--r-- | sql/sql_cache.h | 4 | ||||
-rw-r--r-- | sql/sql_table.cc | 2 | ||||
-rw-r--r-- | sql/sql_test.cc | 2 | ||||
-rw-r--r-- | sql/uniques.cc | 6 | ||||
-rw-r--r-- | sql/uniques.h | 12 |
8 files changed, 17 insertions, 17 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index dff6e6adf6b..92f18d7402f 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -36,9 +36,9 @@ used in Item_sum_* */ -ulonglong Item_sum::ram_limitation(THD *thd) +size_t Item_sum::ram_limitation(THD *thd) { - return MY_MIN(thd->variables.tmp_memory_table_size, + return (size_t)MY_MIN(thd->variables.tmp_memory_table_size, thd->variables.max_heap_table_size); } diff --git a/sql/item_sum.h b/sql/item_sum.h index 852df778087..0c655ded153 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -382,7 +382,7 @@ protected: */ Item **orig_args, *tmp_orig_args[2]; - static ulonglong ram_limitation(THD *thd); + static size_t ram_limitation(THD *thd); public: diff --git a/sql/opt_range.cc b/sql/opt_range.cc index f8f1d0a3efd..f06ae21fe9c 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -10912,7 +10912,7 @@ int read_keys_and_merge_scans(THD *thd, unique= new Unique(refpos_order_cmp, (void *)file, file->ref_length, - thd->variables.sortbuff_size, + (size_t)thd->variables.sortbuff_size, intersection ? quick_selects.elements : 0); if (!unique) goto err; diff --git a/sql/sql_cache.h b/sql/sql_cache.h index 6b8bf0b2d05..ad9cac76b0a 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -557,8 +557,8 @@ struct Query_cache_query_flags ha_rows limit; Time_zone *time_zone; sql_mode_t sql_mode; - ulong max_sort_length; - ulong group_concat_max_len; + ulonglong max_sort_length; + ulonglong group_concat_max_len; ulong default_week_format; ulong div_precision_increment; MY_LOCALE *lc_time_names; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 2ea8779c1a9..de367eda992 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4352,7 +4352,7 @@ static bool prepare_blob_field(THD *thd, Column_definition *sql_field) sql_field->sql_type == FIELD_TYPE_MEDIUM_BLOB) { /* The user has given a length to the blob column */ - sql_field->sql_type= get_blob_type_from_length(sql_field->length); + sql_field->sql_type= get_blob_type_from_length((ulong)sql_field->length); sql_field->pack_length= calc_pack_length(sql_field->sql_type, 0); } sql_field->length= 0; diff --git a/sql/sql_test.cc b/sql/sql_test.cc index e70872af6c5..feb99861c48 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -432,7 +432,7 @@ static void push_locks_into_array(DYNAMIC_ARRAY *ar, THR_LOCK_DATA *data, if (table && table->s->tmp_table == NO_TMP_TABLE) { TABLE_LOCK_INFO table_lock_info; - table_lock_info.thread_id= table->in_use->thread_id; + table_lock_info.thread_id= (ulong)table->in_use->thread_id; memcpy(table_lock_info.table_name, table->s->table_cache_key.str, table->s->table_cache_key.length); table_lock_info.table_name[strlen(table_lock_info.table_name)]='.'; diff --git a/sql/uniques.cc b/sql/uniques.cc index 338f7c7c537..7def2d79ad7 100644 --- a/sql/uniques.cc +++ b/sql/uniques.cc @@ -79,7 +79,7 @@ int unique_intersect_write_to_ptrs(uchar* key, element_count count, Unique *uniq Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg, - uint size_arg, ulonglong max_in_memory_size_arg, + uint size_arg, size_t max_in_memory_size_arg, uint min_dupl_count_arg) :max_in_memory_size(max_in_memory_size_arg), size(size_arg), @@ -91,7 +91,7 @@ Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg, if (min_dupl_count_arg) full_size+= sizeof(element_count); with_counters= MY_TEST(min_dupl_count_arg); - init_tree(&tree, (ulong) (max_in_memory_size / 16), 0, size, comp_func, + init_tree(&tree, (max_in_memory_size / 16), 0, size, comp_func, NULL, comp_func_fixed_arg, MYF(MY_THREAD_SPECIFIC)); /* If the following fail's the next add will also fail */ my_init_dynamic_array(&file_ptrs, sizeof(BUFFPEK), 16, 16, @@ -306,7 +306,7 @@ static double get_merge_many_buffs_cost(uint *buffer, */ double Unique::get_use_cost(uint *buffer, size_t nkeys, uint key_size, - ulonglong max_in_memory_size, + size_t max_in_memory_size, uint compare_factor, bool intersect_fl, bool *in_memory) { diff --git a/sql/uniques.h b/sql/uniques.h index 0210e879788..efc79953bb6 100644 --- a/sql/uniques.h +++ b/sql/uniques.h @@ -30,7 +30,7 @@ class Unique :public Sql_alloc { DYNAMIC_ARRAY file_ptrs; ulong max_elements; - ulonglong max_in_memory_size; + size_t max_in_memory_size; IO_CACHE file; TREE tree; ulong filtered_out_elems; @@ -46,7 +46,7 @@ public: ulong elements; SORT_INFO sort; Unique(qsort_cmp2 comp_func, void *comp_func_fixed_arg, - uint size_arg, ulonglong max_in_memory_size_arg, + uint size_arg, size_t max_in_memory_size_arg, uint min_dupl_count_arg= 0); ~Unique(); ulong elements_in_tree() { return tree.elements_in_tree; } @@ -72,12 +72,12 @@ public: } static double get_use_cost(uint *buffer, size_t nkeys, uint key_size, - ulonglong max_in_memory_size, uint compare_factor, + size_t max_in_memory_size, uint compare_factor, bool intersect_fl, bool *in_memory); inline static int get_cost_calc_buff_size(size_t nkeys, uint key_size, - ulonglong max_in_memory_size) + size_t max_in_memory_size) { - register ulonglong max_elems_in_tree= + register size_t max_elems_in_tree= max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size); return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree)); } @@ -86,7 +86,7 @@ public: bool walk(TABLE *table, tree_walk_action action, void *walk_action_arg); uint get_size() const { return size; } - ulonglong get_max_in_memory_size() const { return max_in_memory_size; } + size_t get_max_in_memory_size() const { return max_in_memory_size; } friend int unique_write_to_file(uchar* key, element_count count, Unique *unique); friend int unique_write_to_ptrs(uchar* key, element_count count, Unique *unique); |