diff options
-rw-r--r-- | sql/sql_class.h | 2 | ||||
-rw-r--r-- | sql/sql_join_cache.cc | 2 | ||||
-rw-r--r-- | sql/sql_join_cache.h | 6 | ||||
-rw-r--r-- | sql/sql_lifo_buffer.h | 4 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 | ||||
-rw-r--r-- | sql/sql_string.h | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 622c16e6f60..6bee43cebc7 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -768,7 +768,7 @@ public: Server_side_cursor *cursor; inline char *query() { return query_string.str; } - inline uint32 query_length() { return query_string.length; } + inline uint32 query_length() { return (uint32)query_string.length; } void set_query_inner(char *query_arg, uint32 query_length_arg); /** diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 94962f067fa..be3def865a8 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -1230,7 +1230,7 @@ uint JOIN_CACHE::write_record_data(uchar * link, bool *is_full) /* Make an adjustment for the size of the auxiliary buffer if there is any */ uint incr= aux_buffer_incr(records); - ulong rem= rem_space(); + size_t rem= rem_space(); aux_buff_size+= len+incr < rem ? incr : rem; /* diff --git a/sql/sql_join_cache.h b/sql/sql_join_cache.h index 4c1cb4454f1..2d7c090e778 100644 --- a/sql/sql_join_cache.h +++ b/sql/sql_join_cache.h @@ -398,7 +398,7 @@ protected: virtual uint aux_buffer_incr(ulong recno); /* Shall calculate how much space is remaining in the join buffer */ - virtual ulong rem_space() + virtual size_t rem_space() { return max(buff_size-(end_pos-buff)-aux_buff_size,0); } @@ -576,7 +576,7 @@ public: virtual int init(); /* Get the current size of the cache join buffer */ - ulong get_join_buffer_size() { return buff_size; } + size_t get_join_buffer_size() { return buff_size; } /* Set the size of the cache join buffer to a new value */ void set_join_buffer_size(size_t sz) { buff_size= sz; } @@ -921,7 +921,7 @@ protected: Calculate how much space in the buffer would not be occupied by records, key entries and additional memory for the MMR buffer. */ - ulong rem_space() + size_t rem_space() { return max(last_key_entry-end_pos-aux_buff_size,0); } diff --git a/sql/sql_lifo_buffer.h b/sql/sql_lifo_buffer.h index af26f8b5652..34f9624436d 100644 --- a/sql/sql_lifo_buffer.h +++ b/sql/sql_lifo_buffer.h @@ -102,8 +102,8 @@ public: void sort(qsort2_cmp cmp_func, void *cmp_func_arg) { - uint elem_size= size1 + size2; - uint n_elements= used_size() / elem_size; + size_t elem_size= size1 + size2; + size_t n_elements= used_size() / elem_size; my_qsort2(used_area(), n_elements, elem_size, cmp_func, cmp_func_arg); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 163c559c5db..7b1f8b31ad5 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1706,7 +1706,7 @@ bool JOIN::shrink_join_buffers(JOIN_TAB *jt, cache= tab->cache; if (cache) { - ulong buff_size; + size_t buff_size; if (needed_space < cache->get_min_join_buffer_size()) return TRUE; if (cache->shrink_join_buffer_in_ratio(curr_space, needed_space)) diff --git a/sql/sql_string.h b/sql/sql_string.h index 5da0d38f24d..c9eaf924e4d 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -363,7 +363,7 @@ public: void qs_append(const char *str) { - qs_append(str, strlen(str)); + qs_append(str, (uint32)strlen(str)); } void qs_append(const char *str, uint32 len); void qs_append(double d); |