summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-11-27 14:43:24 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-11-27 14:43:24 +0000
commit1c4968f2f39ee7796853d70d71b061989293bacb (patch)
tree5cc740cf245417bcb63d61dacff4509fd678c8bd
parent1029b22feb8d9768df9e8b7b0344e2961bf82659 (diff)
downloadmariadb-git-1c4968f2f39ee7796853d70d71b061989293bacb.tar.gz
Fix warnings
-rw-r--r--sql/log.cc2
-rw-r--r--sql/rpl_utility.cc8
-rw-r--r--sql/sql_acl.cc5
-rw-r--r--sql/sql_sequence.cc2
4 files changed, 8 insertions, 9 deletions
diff --git a/sql/log.cc b/sql/log.cc
index be8b24da8df..24da00844bc 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2391,7 +2391,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name, const char **errmsg)
*errmsg = "Could not open log file";
goto err;
}
- if (init_io_cache(log, file, binlog_file_cache_size, READ_CACHE, 0, 0,
+ if (init_io_cache(log, file, (size_t)binlog_file_cache_size, READ_CACHE, 0, 0,
MYF(MY_WME|MY_DONT_CHECK_FILESIZE)))
{
sql_print_error("Failed to create a cache on log (file '%s')",
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc
index 774f582b4b9..9c1892e0c6c 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -141,10 +141,10 @@ max_display_length_for_field(enum_field_types sql_type, unsigned int metadata)
*/
case MYSQL_TYPE_TINY_BLOB:
- return my_set_bits(1 * 8);
+ return (uint32)my_set_bits(1 * 8);
case MYSQL_TYPE_MEDIUM_BLOB:
- return my_set_bits(3 * 8);
+ return (uint32)my_set_bits(3 * 8);
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_BLOB_COMPRESSED:
@@ -153,11 +153,11 @@ max_display_length_for_field(enum_field_types sql_type, unsigned int metadata)
blobs are of type MYSQL_TYPE_BLOB. In that case, we have to look
at the length instead to decide what the max display size is.
*/
- return my_set_bits(metadata * 8);
+ return (uint32)my_set_bits(metadata * 8);
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_GEOMETRY:
- return my_set_bits(4 * 8);
+ return (uint32)my_set_bits(4 * 8);
default:
return ~(uint32) 0;
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 7e31d448bdf..a5265b5a742 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -7367,9 +7367,8 @@ static bool grant_load(THD *thd,
continue;
}
}
- uint type= procs_priv.routine_type()->val_int();
- const Sp_handler *sph= Sp_handler::handler((stored_procedure_type)
- type);
+ stored_procedure_type type= (stored_procedure_type)procs_priv.routine_type()->val_int();
+ const Sp_handler *sph= Sp_handler::handler(type);
if (!sph || !(hash= sph->get_priv_hash()))
{
sql_print_warning("'procs_priv' entry '%s' "
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index 1af37fe1fad..e2d3f225e47 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -113,7 +113,7 @@ bool sequence_definition::check_and_adjust(bool set_reserved_until)
/* To ensure that cache * real_increment will never overflow */
max_increment= (real_increment ?
- labs(real_increment) :
+ llabs(real_increment) :
MAX_AUTO_INCREMENT_VALUE);
if (max_value >= start &&