diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-11-03 11:47:10 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-11-03 11:47:10 +0100 |
commit | f8997c68fe645cc94f6730a135aca5e530dec449 (patch) | |
tree | b3d607eb1a106a16b900d7da6af81a60332a7584 /sql/sql_insert.cc | |
parent | 49a22c5897823c528d52886f6048d5b4c91e221f (diff) | |
parent | acf8dc0a577f8fed2d059c033f4efbd07dd95ac0 (diff) | |
download | mariadb-git-mariadb-10.10.2.tar.gz |
Merge branch '10.9' into 10.10mariadb-10.10.2
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 9b4a130d770..adcc46637d9 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4547,6 +4547,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, |