diff --git a/sql/field_comp.cc b/sql/field_comp.cc index 473d470940d..9a7b3a7c7e0 100644 --- a/sql/field_comp.cc +++ b/sql/field_comp.cc @@ -62,6 +62,7 @@ static int uncompress_zlib(String *to, const uchar *from, uint from_length, z_stream stream; uchar original_pack_length; int wbits; + ulonglong avail_out; original_pack_length= *from & 0x07; wbits= *from & 8 ? -MAX_WBITS : MAX_WBITS; @@ -75,14 +76,15 @@ static int uncompress_zlib(String *to, const uchar *from, uint from_length, return 1; } - stream.avail_out= read_bigendian(from, original_pack_length); + avail_out= (ulonglong)read_bigendian(from, original_pack_length); - if (stream.avail_out > field_length) + if (avail_out > field_length) { my_error(ER_ZLIB_Z_DATA_ERROR, MYF(0)); return 1; } + stream.avail_out= (uint)avail_out; if (to->alloc(stream.avail_out)) return 1; diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic index da6d902a167..706240727c5 100644 --- a/sql/sys_vars.ic +++ b/sql/sys_vars.ic @@ -1767,7 +1767,7 @@ public: option.var_type|= GET_BIT; reverse_semantics= my_count_bits(bitmask_arg) > 1; bitmask= reverse_semantics ? ~bitmask_arg : bitmask_arg; - option.block_size= reverse_semantics ? -(long) bitmask : bitmask; + option.block_size= reverse_semantics ? -(long) bitmask : (long)bitmask; set(global_var_ptr(), def_val); SYSVAR_ASSERT(def_val < 2); SYSVAR_ASSERT(size == sizeof(ulonglong)); diff --git a/storage/innobase/include/sync0policy.h b/storage/innobase/include/sync0policy.h index 6d485c30aed..a91270bde58 100644 --- a/storage/innobase/include/sync0policy.h +++ b/storage/innobase/include/sync0policy.h @@ -199,7 +199,7 @@ public: bool is_owned() const UNIV_NOTHROW { return(os_thread_eq( - my_atomic_loadlint(&m_context.m_thread_id), + (os_thread_id_t)my_atomic_loadlint(&m_context.m_thread_id), os_thread_get_curr_id())); } @@ -221,7 +221,7 @@ public: os_thread_id_t get_thread_id() const UNIV_NOTHROW { - return(my_atomic_loadlint(&m_context.m_thread_id)); + return((os_thread_id_t)my_atomic_loadlint(&m_context.m_thread_id)); } /** Magic number to check for memory corruption. */