diff --git a/sql/field.cc b/sql/field.cc index 6edca83329c..60ca9aa2426 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5118,7 +5118,7 @@ int Field_timestamp::store(longlong nr, bool unsigned_val) Longlong_hybrid tmp(nr, unsigned_val); ErrConvInteger str(tmp); THD *thd= get_thd(); - Datetime dt(thd, &error, tmp, Timestamp::DatetimeOptions(thd)); + Datetime dt(&error, tmp, Timestamp::DatetimeOptions(thd)); return store_TIME_with_warning(thd, &dt, &str, error); } @@ -5596,7 +5596,7 @@ int Field_datetime::store(longlong nr, bool unsigned_val) Longlong_hybrid tmp(nr, unsigned_val); ErrConvInteger str(tmp); THD *thd= get_thd(); - Datetime dt(thd, &error, tmp, Datetime::Options(thd)); + Datetime dt(&error, tmp, Datetime::Options(thd)); return store_TIME_with_warning(&dt, &str, error); } @@ -6314,7 +6314,7 @@ int Field_date_common::store(longlong nr, bool unsigned_val) Longlong_hybrid tmp(nr, unsigned_val); ErrConvInteger str(tmp); THD *thd= get_thd(); - Datetime dt(thd, &error, tmp, Date::Options(thd)); + Datetime dt(&error, tmp, Date::Options(thd)); return store_TIME_with_warning(&dt, &str, error); } diff --git a/sql/sql_type.h b/sql/sql_type.h index 10b7ed94da0..0aa142d5c37 100644 --- a/sql/sql_type.h +++ b/sql/sql_type.h @@ -1950,14 +1950,14 @@ public: } protected: - Datetime(THD *thd, int *warn, const Sec6 &nr, date_mode_t flags) + Datetime(int *warn, const Sec6 &nr, date_mode_t flags) :Temporal_with_date(warn, nr, flags) { date_to_datetime_if_needed(); DBUG_ASSERT(is_valid_value_slow()); } Datetime(THD *thd, int *warn, const Sec9 &nr, date_mode_t fuzzydate) - :Datetime(thd, warn, static_cast(nr), fuzzydate) + :Datetime(warn, static_cast(nr), fuzzydate) { if (is_valid_datetime() && time_round_mode_t(fuzzydate) == TIME_FRAC_ROUND) @@ -1966,8 +1966,8 @@ protected: } public: - Datetime(THD *thd, int *warn, const Longlong_hybrid &nr, date_mode_t mode) - :Datetime(thd, warn, Sec6(nr), mode) + Datetime(int *warn, const Longlong_hybrid &nr, date_mode_t mode) + :Datetime(warn, Sec6(nr), mode) { } Datetime(THD *thd, int *warn, double nr, date_mode_t fuzzydate) :Datetime(thd, warn, Sec9(nr), fuzzydate)