mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Using Schema_specification_st instead of HA_CREATE_INFO in a few places
where the former is enough.
This commit is contained in:
@ -4058,7 +4058,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
|
|||||||
{
|
{
|
||||||
LEX_STRING new_db;
|
LEX_STRING new_db;
|
||||||
int expected_error,actual_error= 0;
|
int expected_error,actual_error= 0;
|
||||||
HA_CREATE_INFO db_options;
|
Schema_specification_st db_options;
|
||||||
uint64 sub_id= 0;
|
uint64 sub_id= 0;
|
||||||
rpl_gtid gtid;
|
rpl_gtid gtid;
|
||||||
Relay_log_info const *rli= rgi->rli;
|
Relay_log_info const *rli= rgi->rli;
|
||||||
|
@ -4268,12 +4268,6 @@ end_with_restore_list:
|
|||||||
break;
|
break;
|
||||||
case SQLCOM_CREATE_DB:
|
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))
|
if (check_db_name(&lex->name))
|
||||||
{
|
{
|
||||||
my_error(ER_WRONG_DB_NAME, MYF(0), lex->name.str);
|
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))
|
lex->name.str, NULL, NULL, 1, 0))
|
||||||
break;
|
break;
|
||||||
WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_DROP_DB:
|
case SQLCOM_DROP_DB:
|
||||||
@ -4375,7 +4370,6 @@ end_with_restore_list:
|
|||||||
case SQLCOM_ALTER_DB:
|
case SQLCOM_ALTER_DB:
|
||||||
{
|
{
|
||||||
LEX_STRING *db= &lex->name;
|
LEX_STRING *db= &lex->name;
|
||||||
HA_CREATE_INFO create_info(lex->create_info);
|
|
||||||
if (check_db_name(db))
|
if (check_db_name(db))
|
||||||
{
|
{
|
||||||
my_error(ER_WRONG_DB_NAME, MYF(0), db->str);
|
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))
|
if (check_access(thd, ALTER_ACL, db->str, NULL, NULL, 1, 0))
|
||||||
break;
|
break;
|
||||||
WSREP_TO_ISOLATION_BEGIN(db->str, NULL, NULL)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_SHOW_CREATE_DB:
|
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;
|
Security_context *sctx= thd->security_ctx;
|
||||||
uint db_access;
|
uint db_access;
|
||||||
#endif
|
#endif
|
||||||
HA_CREATE_INFO create;
|
Schema_specification_st create;
|
||||||
Protocol *protocol=thd->protocol;
|
Protocol *protocol=thd->protocol;
|
||||||
DBUG_ENTER("mysql_show_create_db");
|
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;
|
LOOKUP_FIELD_VALUES lookup_field_vals;
|
||||||
Dynamic_array<LEX_STRING*> db_names;
|
Dynamic_array<LEX_STRING*> db_names;
|
||||||
HA_CREATE_INFO create;
|
Schema_specification_st create;
|
||||||
TABLE *table= tables->table;
|
TABLE *table= tables->table;
|
||||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
Security_context *sctx= thd->security_ctx;
|
Security_context *sctx= thd->security_ctx;
|
||||||
|
@ -4207,7 +4207,7 @@ static void set_table_default_charset(THD *thd,
|
|||||||
*/
|
*/
|
||||||
if (!create_info->default_table_charset)
|
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);
|
load_db_opt_by_name(thd, db, &db_info);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user