summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-11-02 14:33:20 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2022-11-02 14:33:20 +0100
commite5aa58190fd8697b3858add4b8f86a5fd38e07f8 (patch)
treed374390fa82b455d0944f74a346ddb07f761c0b9 /sql/sql_insert.cc
parent64143741789a3e1c2bb8c6bf627eaec3751af0c6 (diff)
parent177d858e38d7fa7e90a7088fcc2f5576eba411a0 (diff)
downloadmariadb-git-e5aa58190fd8697b3858add4b8f86a5fd38e07f8.tar.gz
Merge branch '10.5' into 10.6
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 196bfcaf6e8..5ad968f19a0 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4487,6 +4487,16 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
alter_info->create_list.push_back(cr_field, thd->mem_root);
}
+ /*
+ Item*::type_handler() always returns pointers to
+ type_handler_{time2|datetime2|timestamp2} no matter what
+ the current mysql56_temporal_format says.
+ Let's convert them according to mysql56_temporal_format.
+ QQ: This perhaps should eventually be fixed to have Item*::type_handler()
+ respect mysql56_temporal_format, and remove the upgrade from here.
+ */
+ Create_field::upgrade_data_types(alter_info->create_list);
+
if (create_info->check_fields(thd, alter_info,
create_table->table_name,
create_table->db,