Commit 70a7e97e authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fixed high-impact Windows 64bit warnings (at least 4000 of them)

parent 28cb3b85
...@@ -768,7 +768,7 @@ public: ...@@ -768,7 +768,7 @@ public:
Server_side_cursor *cursor; Server_side_cursor *cursor;
inline char *query() { return query_string.str; } 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); void set_query_inner(char *query_arg, uint32 query_length_arg);
/** /**
......
...@@ -1230,7 +1230,7 @@ uint JOIN_CACHE::write_record_data(uchar * link, bool *is_full) ...@@ -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 */ /* Make an adjustment for the size of the auxiliary buffer if there is any */
uint incr= aux_buffer_incr(records); uint incr= aux_buffer_incr(records);
ulong rem= rem_space(); size_t rem= rem_space();
aux_buff_size+= len+incr < rem ? incr : rem; aux_buff_size+= len+incr < rem ? incr : rem;
/* /*
......
...@@ -398,7 +398,7 @@ protected: ...@@ -398,7 +398,7 @@ protected:
virtual uint aux_buffer_incr(ulong recno); virtual uint aux_buffer_incr(ulong recno);
/* Shall calculate how much space is remaining in the join buffer */ /* 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); return max(buff_size-(end_pos-buff)-aux_buff_size,0);
} }
...@@ -576,7 +576,7 @@ public: ...@@ -576,7 +576,7 @@ public:
virtual int init(); virtual int init();
/* Get the current size of the cache join buffer */ /* 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 */ /* Set the size of the cache join buffer to a new value */
void set_join_buffer_size(size_t sz) { buff_size= sz; } void set_join_buffer_size(size_t sz) { buff_size= sz; }
...@@ -921,7 +921,7 @@ protected: ...@@ -921,7 +921,7 @@ protected:
Calculate how much space in the buffer would not be occupied by Calculate how much space in the buffer would not be occupied by
records, key entries and additional memory for the MMR buffer. 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); return max(last_key_entry-end_pos-aux_buff_size,0);
} }
......
...@@ -102,8 +102,8 @@ public: ...@@ -102,8 +102,8 @@ public:
void sort(qsort2_cmp cmp_func, void *cmp_func_arg) void sort(qsort2_cmp cmp_func, void *cmp_func_arg)
{ {
uint elem_size= size1 + size2; size_t elem_size= size1 + size2;
uint n_elements= used_size() / elem_size; size_t n_elements= used_size() / elem_size;
my_qsort2(used_area(), n_elements, elem_size, cmp_func, cmp_func_arg); my_qsort2(used_area(), n_elements, elem_size, cmp_func, cmp_func_arg);
} }
......
...@@ -1706,7 +1706,7 @@ bool JOIN::shrink_join_buffers(JOIN_TAB *jt, ...@@ -1706,7 +1706,7 @@ bool JOIN::shrink_join_buffers(JOIN_TAB *jt,
cache= tab->cache; cache= tab->cache;
if (cache) if (cache)
{ {
ulong buff_size; size_t buff_size;
if (needed_space < cache->get_min_join_buffer_size()) if (needed_space < cache->get_min_join_buffer_size())
return TRUE; return TRUE;
if (cache->shrink_join_buffer_in_ratio(curr_space, needed_space)) if (cache->shrink_join_buffer_in_ratio(curr_space, needed_space))
......
...@@ -363,7 +363,7 @@ public: ...@@ -363,7 +363,7 @@ public:
void qs_append(const char *str) 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(const char *str, uint32 len);
void qs_append(double d); void qs_append(double d);
......
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