summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-28 10:38:02 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-28 17:20:46 +0000
commit7354dc67737fdeb105656f5cec055da627bb9c29 (patch)
tree7cc2b5f975d5e32eb94cd1344b259ea1b24018d6 /sql/item_create.cc
parent509928718d52a14739fcfb2ebf0e68b4c8e01be5 (diff)
downloadmariadb-git-7354dc67737fdeb105656f5cec055da627bb9c29.tar.gz
MDEV-13384 - misc Windows warnings fixed
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 4730e187ebe..b6430ecf18d 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -71,7 +71,7 @@ static void wrong_precision_error(uint errcode, Item *a,
*/
bool get_length_and_scale(ulonglong length, ulonglong decimals,
- ulong *out_length, uint *out_decimals,
+ uint *out_length, uint *out_decimals,
uint max_precision, uint max_scale,
Item *a)
{
@@ -88,8 +88,9 @@ bool get_length_and_scale(ulonglong length, ulonglong decimals,
*out_decimals= (uint) decimals;
my_decimal_trim(&length, out_decimals);
- *out_length= (ulong) length;
-
+ *out_length= (uint) length;
+
+
if (*out_length < *out_decimals)
{
my_error(ER_M_BIGGER_THAN_D, MYF(0), "");
@@ -3309,7 +3310,7 @@ Create_udf_func Create_udf_func::s_singleton;
Item*
Create_udf_func::create_func(THD *thd, LEX_STRING name, List<Item> *item_list)
{
- udf_func *udf= find_udf(name.str, name.length);
+ udf_func *udf= find_udf(name.str, (uint)name.length);
DBUG_ASSERT(udf);
return create(thd, udf, item_list);
}
@@ -7182,7 +7183,7 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
break;
case ITEM_CAST_DECIMAL:
{
- ulong len;
+ uint len;
uint dec;
if (get_length_and_scale(length, decimals, &len, &dec,
DECIMAL_MAX_PRECISION, DECIMAL_MAX_SCALE,
@@ -7193,9 +7194,7 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
}
case ITEM_CAST_DOUBLE:
{
- ulong len;
- uint dec;
-
+ uint len, dec;
if (!c_len)
{
length= DBL_DIG+7;