diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-06 12:55:58 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-06 12:55:58 +0000 |
commit | 6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch) | |
tree | 3603f88e1b3bd1e622edb182cccd882dd31ddc8a /sql/sys_vars.cc | |
parent | f271100836d8a91a775894ec36b869a66a3145e5 (diff) | |
download | mariadb-git-6c279ad6a71c63cb595fde7c951aadb31c3dbebc.tar.gz |
MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:))
Change function prototypes to accept size_t, where in the past
ulong or uint were used. change local/member variables to size_t
when appropriate.
This fix excludes rocksdb, spider,spider, sphinx and connect for now.
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 94c77136993..4e49d524ce5 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2819,7 +2819,7 @@ static Sys_var_enum Sys_thread_handling( #ifdef HAVE_QUERY_CACHE static bool fix_query_cache_size(sys_var *self, THD *thd, enum_var_type type) { - ulong new_cache_size= query_cache.resize((ulong)query_cache_size); + size_t new_cache_size= query_cache.resize((size_t)query_cache_size); /* Note: query_cache_size is a global variable reflecting the requested cache size. See also query_cache_size_arg @@ -2827,7 +2827,7 @@ static bool fix_query_cache_size(sys_var *self, THD *thd, enum_var_type type) if (query_cache_size != new_cache_size) push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN, ER_WARN_QC_RESIZE, ER_THD(thd, ER_WARN_QC_RESIZE), - query_cache_size, new_cache_size); + query_cache_size, (ulong)new_cache_size); query_cache_size= new_cache_size; @@ -2858,7 +2858,7 @@ static Sys_var_ulong Sys_query_cache_limit( static bool fix_qcache_min_res_unit(sys_var *self, THD *thd, enum_var_type type) { query_cache_min_res_unit= - query_cache.set_min_res_unit(query_cache_min_res_unit); + (ulong)query_cache.set_min_res_unit(query_cache_min_res_unit); return false; } static Sys_var_ulong Sys_query_cache_min_res_unit( |