summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-11-15 08:59:30 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-11-15 08:59:30 +0200
commit3dd4bad4b3c7681eba3b16af888e8e82d772e826 (patch)
tree35a55475bfc7c992c4f455d586e27daff908a2a3 /sql/sql_insert.cc
parent8d1c85a6dd8580f23709c21dfd008787315e2c9a (diff)
parentae6ebafd819d48c965d2615fc78f1f950e0fbf40 (diff)
downloadmariadb-git-bb-10.6-MDEV-25948-MDEV-25611.tar.gz
Interesting test failures: ./mtr --parallel=auto --mysqld=--debug-dbug=d,ib_log_checkpoint_avoid \ --max-test-fail=0 --big-test --force \ binlog{,_encryption}.binlog_incident rpl.rpl_skip_incident \ binlog.binlog_killed_simulate rpl.rpl_loaddata_fatal
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,