diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index a7c9a836fde..6e81b03d846 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1326,6 +1326,10 @@ longlong Item_func_mod::int_op() signal_divide_by_null(); return 0; } + + if (args[0]->unsigned_flag) + return ((ulonglong) value) % val2; + return value % val2; } |