diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 832079c964f..145a12afb52 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1482,10 +1482,10 @@ uint maria_multi_check(THD *thd, char *packet, uint packet_length) { char *packet_start= packet; size_t subpacket_length= net_field_length((uchar **)&packet_start); - uint length_length= packet_start - packet; + size_t length_length= packet_start - packet; // length of command + 3 bytes where that length was stored DBUG_PRINT("info", ("sub-packet length: %ld + %d command: %x", - (ulong)subpacket_length, length_length, + (ulong)subpacket_length, (int) length_length, packet_start[3])); if (subpacket_length == 0 || @@ -1932,7 +1932,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, (The packet is guaranteed to end with an end zero) */ arg_end= strend(packet); - uint arg_length= arg_end - packet; + uint arg_length= (uint)(arg_end - packet); /* Check given table name length. */ if (packet_length - arg_length > NAME_LEN + 1 || arg_length > SAFE_NAME_LEN) @@ -2173,7 +2173,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, length= my_snprintf(buff, buff_len - 1, "Uptime: %lu Threads: %d Questions: %lu " - "Slow queries: %lu Opens: %lu Flush tables: %lu " + "Slow queries: %lu Opens: %lu Flush tables: %lld " "Open tables: %u Queries per second avg: %u.%03u", uptime, (int) thread_count, (ulong) thd->query_id, @@ -2262,7 +2262,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, char *packet_start= packet; /* We have to store next length because it will be destroyed by '\0' */ size_t next_subpacket_length= net_field_length((uchar **)&packet_start); - uint next_length_length= packet_start - packet; + size_t next_length_length= packet_start - packet; unsigned char *readbuff= net->buff; if (net_allocate_new_packet(net, thd, MYF(0))) @@ -2277,7 +2277,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { current_com++; size_t subpacket_length= next_subpacket_length + next_length_length; - uint length_length= next_length_length; + size_t length_length= next_length_length; if (subpacket_length < packet_length) { packet_start= packet + subpacket_length; @@ -7666,7 +7666,7 @@ void create_select_for_variable(const char *var_name) if ((var= get_system_var(thd, OPT_SESSION, tmp, null_clex_str))) { end= strxmov(buff, "@@session.", var_name, NullS); - var->set_name(thd, buff, end-buff, system_charset_info); + var->set_name(thd, buff, (uint)(end-buff), system_charset_info); add_item_to_list(thd, var); } DBUG_VOID_RETURN; |