Skip to content

Commit 274746f

Browse files
committed
Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6
Change-Id: I86408ecad4a991e217b8a07be62cbba3907cd505
2 parents fd6b2dd + f363102 commit 274746f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/item_sum.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
1+
/* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -1728,7 +1728,7 @@ void Item_sum_avg::fix_length_and_dec()
17281728
decimals,
17291729
unsigned_flag);
17301730
f_precision= min(precision+DECIMAL_LONGLONG_DIGITS, DECIMAL_MAX_PRECISION);
1731-
f_scale= args[0]->decimals;
1731+
f_scale = min<uint>(args[0]->decimals, f_precision);
17321732
dec_bin_size= my_decimal_get_binary_size(f_precision, f_scale);
17331733
}
17341734
else {

0 commit comments

Comments
 (0)