summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-25 10:14:33 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-25 10:14:33 +0300
commitd3350c160a7a884e97a5e4a696432230c13d53e0 (patch)
treef7f5c35737b4c87dcfac73f7547d0d2321276be9 /sql/item_func.cc
parenta39c4b5f9f7f4d2766f1ddb9487de27259e804a1 (diff)
parentb6bb64e54a3e34a20cda34e25b6ec62a097955ef (diff)
downloadmariadb-git-d3350c160a7a884e97a5e4a696432230c13d53e0.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index aa35b7a3b16..e66fe12c57f 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1711,8 +1711,11 @@ my_decimal *Item_func_mod::decimal_op(my_decimal *decimal_value)
void Item_func_mod::result_precision()
{
+ unsigned_flag= args[0]->unsigned_flag;
decimals= MY_MAX(args[0]->decimal_scale(), args[1]->decimal_scale());
- max_length= MY_MAX(args[0]->max_length, args[1]->max_length);
+ uint prec= MY_MAX(args[0]->decimal_precision(), args[1]->decimal_precision());
+ fix_char_length(my_decimal_precision_to_length_no_truncation(prec, decimals,
+ unsigned_flag));
}