summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
commit6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch)
tree3603f88e1b3bd1e622edb182cccd882dd31ddc8a /sql/sql_udf.cc
parentf271100836d8a91a775894ec36b869a66a3145e5 (diff)
downloadmariadb-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/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 0f4310fdec1..3eb50d45b42 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -312,7 +312,7 @@ static void del_udf(udf_func *udf)
doesn't use it anymore
*/
const char *name= udf->name.str;
- uint name_length=udf->name.length;
+ size_t name_length=udf->name.length;
udf->name.str= "*";
udf->name.length=1;
my_hash_update(&udf_hash,(uchar*) udf,(uchar*) name,name_length);
@@ -347,7 +347,7 @@ void free_udf(udf_func *udf)
/* This is only called if using_udf_functions != 0 */
-udf_func *find_udf(const char *name,uint length,bool mark_used)
+udf_func *find_udf(const char *name,size_t length,bool mark_used)
{
udf_func *udf=0;
DBUG_ENTER("find_udf");
@@ -432,7 +432,7 @@ static int mysql_drop_function_internal(THD *thd, udf_func *udf, TABLE *table)
DBUG_ENTER("mysql_drop_function_internal");
const char *exact_name_str= udf->name.str;
- uint exact_name_len= udf->name.length;
+ size_t exact_name_len= udf->name.length;
del_udf(udf);
/*