From 521280571c1915952e211e9af341b7675df08a96 Mon Sep 17 00:00:00 2001 From: dcthxdhuang Date: Tue, 28 Jun 2022 15:12:51 +0800 Subject: [PATCH] Bugfix: create table ... like temporary table missing charset info in binlog Use a HA_CREATE_USED_DEFAULT_CHARSET flag to print "DEFAULT CHARSET= " in store_create_info. --- sql/sql_table.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index b60844a71ac..3852b499909 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -10966,6 +10966,7 @@ bool mysql_create_like_table(THD *thd, TABLE_LIST *table, TABLE_LIST *src_table, must force the ENGINE to be present into CREATE TABLE. */ create_info->used_fields |= HA_CREATE_USED_ENGINE; + create_info->used_fields|= HA_CREATE_USED_DEFAULT_CHARSET; bool result [[maybe_unused]] = store_create_info( thd, table, &query, create_info, true /* show_database */); -- 2.34.1.182.ge773545c7f