summaryrefslogtreecommitdiff
path: root/sql/sql_type.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2022-04-22 01:32:55 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2022-04-26 18:36:36 +0400
commiteca207c46293bc72dd8d0d5622153fab4d3fccf1 (patch)
tree9958754821cc87bd810e6816d50ec6d6567d4e59 /sql/sql_type.cc
parent945245aea4baf5399470ec0cff5d5d51c36a95d6 (diff)
downloadmariadb-git-eca207c46293bc72dd8d0d5622153fab4d3fccf1.tar.gz
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes the existing behaviour so problemmatic to ix.
Diffstat (limited to 'sql/sql_type.cc')
-rw-r--r--sql/sql_type.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/sql_type.cc b/sql/sql_type.cc
index c1f192b0622..b1e141d0eeb 100644
--- a/sql/sql_type.cc
+++ b/sql/sql_type.cc
@@ -258,7 +258,6 @@ Type_handler_decimal_result::make_num_distinct_aggregator_field(
const Item *item)
const
{
- DBUG_ASSERT(item->decimals <= DECIMAL_MAX_SCALE);
return new (mem_root)
Field_new_decimal(NULL, item->max_length,
(uchar *) (item->maybe_null ? "" : 0),