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

Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä
2019-06-20 09:22:10 +03:00
78 changed files with 4098 additions and 516 deletions

View File

@ -533,12 +533,42 @@ public:
};
class VSec9: public Sec9
class VSec9: protected Sec9
{
bool m_is_null;
Sec9& to_sec9()
{
DBUG_ASSERT(!is_null());
return *this;
}
public:
VSec9(THD *thd, Item *item, const char *type_str, ulonglong limit);
bool is_null() const { return m_is_null; }
const Sec9& to_const_sec9() const
{
DBUG_ASSERT(!is_null());
return *this;
}
bool neg() const { return to_const_sec9().neg(); }
bool truncated() const { return to_const_sec9().truncated(); }
ulonglong sec() const { return to_const_sec9().sec(); }
long usec() const { return to_const_sec9().usec(); }
bool sec_to_time(MYSQL_TIME *ltime, uint dec) const
{
return to_const_sec9().sec_to_time(ltime, dec);
}
void make_truncated_warning(THD *thd, const char *type_str) const
{
return to_const_sec9().make_truncated_warning(thd, type_str);
}
Sec9 &round(uint dec)
{
return to_sec9().round(dec);
}
Sec9 &round(uint dec, time_round_mode_t mode)
{
return to_sec9().round(dec, mode);
}
};