Skip to content
Permalink
Browse files
The patch for MDEV-23551 did not compile on some compilers. Fixing.
  • Loading branch information
abarkov committed Aug 24, 2020
1 parent 04ce293 commit 056766c
Showing 1 changed file with 9 additions and 2 deletions.
@@ -1056,6 +1056,13 @@ class Temporal_hybrid: public Temporal
}
// End of constuctors

bool copy_valid_value_to_mysql_time(MYSQL_TIME *ltime) const
{
DBUG_ASSERT(is_valid_temporal());
*ltime= *this;
return false;
}

longlong to_longlong() const
{
if (!is_valid_temporal())
@@ -1976,7 +1983,7 @@ class Date: public Temporal_with_date
}
explicit Date(const Temporal_hybrid *from)
{
*(static_cast<MYSQL_TIME*>(this))= *from;
from->copy_valid_value_to_mysql_time(this);
DBUG_ASSERT(is_valid_date_slow());
}
bool is_valid_date() const
@@ -2240,7 +2247,7 @@ class Datetime: public Temporal_with_date
}
explicit Datetime(const Temporal_hybrid *from)
{
*(static_cast<MYSQL_TIME*>(this))= *from;
from->copy_valid_value_to_mysql_time(this);
DBUG_ASSERT(is_valid_datetime_slow());
}
explicit Datetime(const MYSQL_TIME *from)

0 comments on commit 056766c

Please sign in to comment.