Commit 0b936cda authored by Alexander Barkov's avatar Alexander Barkov

Using Schema_specification_st instead of HA_CREATE_INFO in a few places

where the former is enough.
parent 822eb6ca
......@@ -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;
......
......@@ -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:
......
......@@ -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<LEX_STRING*> 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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment