diff options
author | Alexander Barkov <bar@mariadb.com> | 2020-05-14 12:33:22 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2020-05-14 12:33:22 +0400 |
commit | f7cf60991d7d4f78ee91004d522f9417cca0f7b9 (patch) | |
tree | 59834687f718361a45c2736be3783191e31fb3dc /sql/item_func.cc | |
parent | ef65c39ab36f8f2747daf8088dbaae5c4ca59194 (diff) | |
parent | 4dc690dc28d69abcc2be683819d8ab0798df0c9e (diff) | |
download | mariadb-git-f7cf60991d7d4f78ee91004d522f9417cca0f7b9.tar.gz |
Merge remote-tracking branch 'origin/10.2' into 10.3
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index dc702d66240..ce34320cb58 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2433,6 +2433,8 @@ void Item_func_round::fix_length_and_dec_decimal(uint decimals_to_set) set_handler(&type_handler_newdecimal); unsigned_flag= args[0]->unsigned_flag; decimals= decimals_to_set; + if (!precision) + precision= 1; // DECIMAL(0,0) -> DECIMAL(1,0) max_length= my_decimal_precision_to_length_no_truncation(precision, decimals, unsigned_flag); |