diff --git a/sql/log_event.cc b/sql/log_event.cc index bbfa16c350d..07182390de3 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -4058,7 +4058,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, { LEX_STRING new_db; int expected_error,actual_error= 0; - HA_CREATE_INFO db_options; + Schema_specification_st db_options; uint64 sub_id= 0; rpl_gtid gtid; Relay_log_info const *rli= rgi->rli; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0bbc1a2dac7..52cf27d3741 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4268,12 +4268,6 @@ end_with_restore_list: break; case SQLCOM_CREATE_DB: { - /* - As mysql_create_db() may modify HA_CREATE_INFO structure passed to - it, we need to use a copy of LEX::create_info to make execution - prepared statement- safe. - */ - Schema_specification_st create_info(lex->create_info); if (check_db_name(&lex->name)) { my_error(ER_WRONG_DB_NAME, MYF(0), lex->name.str); @@ -4303,7 +4297,8 @@ end_with_restore_list: lex->name.str, NULL, NULL, 1, 0)) break; WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL) - res= mysql_create_db(thd, lex->name.str, lex->create_info, &create_info); + res= mysql_create_db(thd, lex->name.str, + lex->create_info, &lex->create_info); break; } case SQLCOM_DROP_DB: @@ -4375,7 +4370,6 @@ end_with_restore_list: case SQLCOM_ALTER_DB: { LEX_STRING *db= &lex->name; - HA_CREATE_INFO create_info(lex->create_info); if (check_db_name(db)) { my_error(ER_WRONG_DB_NAME, MYF(0), db->str); @@ -4403,7 +4397,7 @@ end_with_restore_list: if (check_access(thd, ALTER_ACL, db->str, NULL, NULL, 1, 0)) break; WSREP_TO_ISOLATION_BEGIN(db->str, NULL, NULL) - res= mysql_alter_db(thd, db->str, &create_info); + res= mysql_alter_db(thd, db->str, &lex->create_info); break; } case SQLCOM_SHOW_CREATE_DB: diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d48dd6b627f..05e5d4acebb 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1195,7 +1195,7 @@ bool mysqld_show_create_db(THD *thd, LEX_STRING *dbname, Security_context *sctx= thd->security_ctx; uint db_access; #endif - HA_CREATE_INFO create; + Schema_specification_st create; Protocol *protocol=thd->protocol; DBUG_ENTER("mysql_show_create_db"); @@ -4679,7 +4679,7 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond) LOOKUP_FIELD_VALUES lookup_field_vals; Dynamic_array db_names; - HA_CREATE_INFO create; + Schema_specification_st create; TABLE *table= tables->table; #ifndef NO_EMBEDDED_ACCESS_CHECKS Security_context *sctx= thd->security_ctx; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 17f12f35bf5..729030ee064 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4207,7 +4207,7 @@ static void set_table_default_charset(THD *thd, */ if (!create_info->default_table_charset) { - HA_CREATE_INFO db_info; + Schema_specification_st db_info; load_db_opt_by_name(thd, db, &db_info);