summaryrefslogtreecommitdiff
path: root/sql/sql_type.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-07-31 23:19:51 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2021-07-31 23:19:51 +0200
commitae6bdc6769646a09a8d4d08a42a69174ea677768 (patch)
treec80afdd0e3238dc5092fdcb1439f1390f9a9040b /sql/sql_type.cc
parenta49f5525bbe1bb1f4320bd0db066068a81af62d9 (diff)
parent7841a7eb09208f52fcbab7e80e38c7ca29b1339e (diff)
downloadmariadb-git-ae6bdc6769646a09a8d4d08a42a69174ea677768.tar.gz
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/sql_type.cc')
-rw-r--r--sql/sql_type.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/sql_type.cc b/sql/sql_type.cc
index 6ee51b763e0..118dcaf9d59 100644
--- a/sql/sql_type.cc
+++ b/sql/sql_type.cc
@@ -1089,6 +1089,13 @@ Datetime::Datetime(THD *thd, int *warn, const MYSQL_TIME *from,
DBUG_ASSERT(is_valid_value_slow());
}
+Datetime::Datetime(my_time_t unix_time, ulong second_part_arg,
+ const Time_zone* time_zone)
+{
+ time_zone->gmt_sec_to_TIME(this, unix_time);
+ second_part= second_part_arg;
+}
+
bool Temporal::datetime_add_nanoseconds_or_invalidate(THD *thd, int *warn, ulong nsec)
{
@@ -8738,7 +8745,7 @@ bool Type_handler_string_result::Item_eq_value(THD *thd,
/***************************************************************************/
-bool Type_handler_string_result::union_element_finalize(const Item * item) const
+bool Type_handler_string_result::union_element_finalize(Item_type_holder* item) const
{
if (item->collation.derivation == DERIVATION_NONE)
{
@@ -9034,6 +9041,12 @@ Type_handler_timestamp_common::Item_val_native_with_conversion(THD *thd,
TIME_to_native(thd, &ltime, to, item->datetime_precision(thd));
}
+bool Type_handler_null::union_element_finalize(Item_type_holder *item) const
+{
+ item->set_handler(&type_handler_string);
+ return false;
+}
+
bool
Type_handler_timestamp_common::Item_val_native_with_conversion_result(THD *thd,