1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.3' into 10.4

This commit is contained in:
Oleksandr Byelkin
2020-10-31 21:06:49 +01:00
63 changed files with 1135 additions and 145 deletions

View File

@ -230,7 +230,7 @@ class Dec_ptr_and_buffer: public Dec_ptr
protected:
my_decimal m_buffer;
public:
int round_to(my_decimal *to, uint scale, decimal_round_mode mode)
int round_to(my_decimal *to, int scale, decimal_round_mode mode)
{
DBUG_ASSERT(m_ptr);
return m_ptr->round_to(to, scale, mode);
@ -239,6 +239,14 @@ public:
{
return round_to(&m_buffer, scale, mode);
}
int round_self_if_needed(int scale, decimal_round_mode mode)
{
if (scale >= m_ptr->frac)
return E_DEC_OK;
int res= m_ptr->round_to(&m_buffer, scale, mode);
m_ptr= &m_buffer;
return res;
}
String *to_string_round(String *to, uint dec)
{
/*
@ -3647,6 +3655,8 @@ public:
const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const= 0;
virtual bool is_packable() const { return false; }
virtual uint32 max_display_length(const Item *item) const= 0;
virtual uint32 Item_decimal_notation_int_digits(const Item *item) const { return 0; }
virtual uint32 calc_pack_length(uint32 length) const= 0;
@ -4788,7 +4798,11 @@ public:
void sortlength(THD *thd,
const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const;
bool is_packable()const { return true; }
bool union_element_finalize(const Item * item) const;
bool Column_definition_prepare_stage1(THD *thd,
MEM_ROOT *mem_root,
Column_definition *c,