diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index fbfd21aa006..c762a6d533f 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3445,7 +3445,7 @@ String *Item_func_uuid::val_str(String *str) /* -1 so we won't make tv= uuid_time for nanoseq >= (tv - uuid_time) */ - long delta= min(nanoseq, tv - uuid_time -1); + long delta= min(nanoseq, (long) (tv - uuid_time -1)); tv-= delta; nanoseq-= delta; }