1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge tag '11.4' into 11.6

MariaDB 11.4.4 release
This commit is contained in:
Oleksandr Byelkin
2024-11-08 07:17:00 +01:00
743 changed files with 10281 additions and 4508 deletions

View File

@ -1965,6 +1965,11 @@ public:
{
return neg ? -to_seconds_abs() : to_seconds_abs();
}
bool to_bool() const
{
return is_valid_time() &&
(TIME_to_ulonglong_time(this) != 0 || second_part != 0);
}
longlong to_longlong() const
{
if (!is_valid_time())
@ -2325,6 +2330,10 @@ public:
DBUG_ASSERT(is_valid_date_slow());
return Temporal::to_packed();
}
bool to_bool() const
{
return to_longlong() != 0;
}
longlong to_longlong() const
{
return is_valid_date() ? (longlong) TIME_to_ulonglong_date(this) : 0LL;
@ -2644,6 +2653,11 @@ public:
ltime->time_type= type;
return false;
}
bool to_bool() const
{
return is_valid_datetime() &&
(TIME_to_ulonglong_datetime(this) != 0 || second_part != 0);
}
longlong to_longlong() const
{
return is_valid_datetime() ?
@ -2882,6 +2896,10 @@ public:
return Datetime::zero();
return Timestamp::to_datetime(thd);
}
bool to_bool() const
{
return !m_is_zero_datetime;
}
bool is_zero_datetime() const { return m_is_zero_datetime; }
void trunc(uint decimals)
{
@ -6039,6 +6057,9 @@ public:
const Type_handler *type_handler_signed() const override;
void Item_update_null_value(Item *item) const override;
bool Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *) const override;
Item_cache *Item_get_cache(THD *thd, const Item *item) const override;
int Item_save_in_field(Item *item, Field *field, bool no_conversions)
const override;
};