Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä 2024-03-12 09:19:57 +02:00
commit c3a00dfa53
80 changed files with 2638 additions and 588 deletions

View file

@ -1263,6 +1263,24 @@ public:
};
class Item_long_ge0_func: public Item_int_func
{
public:
Item_long_ge0_func(THD *thd): Item_int_func(thd) { }
Item_long_ge0_func(THD *thd, Item *a): Item_int_func(thd, a) {}
Item_long_ge0_func(THD *thd, Item *a, Item *b): Item_int_func(thd, a, b) {}
Item_long_ge0_func(THD *thd, Item *a, Item *b, Item *c): Item_int_func(thd, a, b, c) {}
Item_long_ge0_func(THD *thd, List<Item> &list): Item_int_func(thd, list) { }
Item_long_ge0_func(THD *thd, Item_long_ge0_func *item) :Item_int_func(thd, item) {}
const Type_handler *type_handler() const
{
DBUG_ASSERT(!unsigned_flag);
return &type_handler_slong_ge0;
}
bool fix_length_and_dec() { max_length= 10; return FALSE; }
};
class Item_func_hash: public Item_int_func
{
public:
@ -1407,6 +1425,13 @@ public:
{
fix_char_length(MAX_BIGINT_WIDTH);
}
void fix_length_and_dec_sint_ge0()
{
uint32 digits= args[0]->decimal_precision();
DBUG_ASSERT(digits > 0);
DBUG_ASSERT(digits <= MY_INT64_NUM_DECIMAL_DIGITS);
fix_char_length(digits + (unsigned_flag ? 0 : 1/*sign*/));
}
void fix_length_and_dec_generic()
{
uint32 char_length= MY_MIN(args[0]->max_char_length(),
@ -1823,6 +1848,7 @@ public:
return name;
}
void fix_length_and_dec_int();
void fix_length_and_dec_sint_ge0();
void fix_length_and_dec_double();
void fix_length_and_dec_decimal();
bool fix_length_and_dec() override;
@ -2152,6 +2178,7 @@ public:
void fix_arg_int(const Type_handler *preferred,
const Type_std_attributes *preferred_attributes,
bool use_decimal_on_length_increase);
void fix_arg_slong_ge0();
void fix_arg_hex_hybrid();
void fix_arg_double();
void fix_arg_time();