cleanup: remove redundant arguments
This commit is contained in:
parent
bf5cc31d4c
commit
010f535b7f
@ -4523,9 +4523,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
|
|||||||
open_table().
|
open_table().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!mysql_create_table_no_lock(thd, &create_table->db,
|
if (!mysql_create_table_no_lock(thd, create_info, alter_info, NULL,
|
||||||
&create_table->table_name,
|
|
||||||
create_info, alter_info, NULL,
|
|
||||||
select_field_count, create_table))
|
select_field_count, create_table))
|
||||||
{
|
{
|
||||||
DEBUG_SYNC(thd,"create_table_select_before_open");
|
DEBUG_SYNC(thd,"create_table_select_before_open");
|
||||||
|
@ -5449,9 +5449,7 @@ warn:
|
|||||||
-1 Table was used with IF NOT EXISTS and table existed (warning, not error)
|
-1 Table was used with IF NOT EXISTS and table existed (warning, not error)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int mysql_create_table_no_lock(THD *thd, const LEX_CSTRING *db,
|
int mysql_create_table_no_lock(THD *thd, Table_specification_st *create_info,
|
||||||
const LEX_CSTRING *table_name,
|
|
||||||
Table_specification_st *create_info,
|
|
||||||
Alter_info *alter_info, bool *is_trans,
|
Alter_info *alter_info, bool *is_trans,
|
||||||
int create_table_mode, TABLE_LIST *table_list)
|
int create_table_mode, TABLE_LIST *table_list)
|
||||||
{
|
{
|
||||||
@ -5459,6 +5457,8 @@ int mysql_create_table_no_lock(THD *thd, const LEX_CSTRING *db,
|
|||||||
uint not_used_2;
|
uint not_used_2;
|
||||||
int res;
|
int res;
|
||||||
char path[FN_REFLEN + 1];
|
char path[FN_REFLEN + 1];
|
||||||
|
const LEX_CSTRING *db= &table_list->db;
|
||||||
|
const LEX_CSTRING *table_name= &table_list->table_name;
|
||||||
LEX_CUSTRING frm= {0,0};
|
LEX_CUSTRING frm= {0,0};
|
||||||
|
|
||||||
if (create_info->tmp_table())
|
if (create_info->tmp_table())
|
||||||
@ -5635,11 +5635,8 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table,
|
|||||||
/* We can abort create table for any table type */
|
/* We can abort create table for any table type */
|
||||||
thd->abort_on_warning= thd->is_strict_mode();
|
thd->abort_on_warning= thd->is_strict_mode();
|
||||||
|
|
||||||
if (mysql_create_table_no_lock(thd, &create_table->db,
|
if (mysql_create_table_no_lock(thd, create_info, alter_info, &is_trans,
|
||||||
&create_table->table_name, create_info,
|
create_table_mode, create_table) > 0)
|
||||||
alter_info,
|
|
||||||
&is_trans, create_table_mode,
|
|
||||||
create_table) > 0)
|
|
||||||
{
|
{
|
||||||
result= 1;
|
result= 1;
|
||||||
goto err;
|
goto err;
|
||||||
@ -6116,10 +6113,8 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
|
|||||||
pos_in_locked_tables= local_create_info.table->pos_in_locked_tables;
|
pos_in_locked_tables= local_create_info.table->pos_in_locked_tables;
|
||||||
|
|
||||||
res= ((create_res=
|
res= ((create_res=
|
||||||
mysql_create_table_no_lock(thd, &table->db, &table->table_name,
|
mysql_create_table_no_lock(thd, &local_create_info, &local_alter_info,
|
||||||
&local_create_info, &local_alter_info,
|
&is_trans, C_ORDINARY_CREATE, table)) > 0);
|
||||||
&is_trans, C_ORDINARY_CREATE,
|
|
||||||
table)) > 0);
|
|
||||||
/* Remember to log if we deleted something */
|
/* Remember to log if we deleted something */
|
||||||
do_logging= thd->log_current_statement;
|
do_logging= thd->log_current_statement;
|
||||||
if (res)
|
if (res)
|
||||||
|
@ -194,9 +194,7 @@ bool add_keyword_to_query(THD *thd, String *result, const LEX_CSTRING *keyword,
|
|||||||
#define C_ALTER_TABLE_FRM_ONLY -2
|
#define C_ALTER_TABLE_FRM_ONLY -2
|
||||||
#define C_ASSISTED_DISCOVERY -3
|
#define C_ASSISTED_DISCOVERY -3
|
||||||
|
|
||||||
int mysql_create_table_no_lock(THD *thd, const LEX_CSTRING *db,
|
int mysql_create_table_no_lock(THD *thd, Table_specification_st *create_info,
|
||||||
const LEX_CSTRING *table_name,
|
|
||||||
Table_specification_st *create_info,
|
|
||||||
Alter_info *alter_info, bool *is_trans,
|
Alter_info *alter_info, bool *is_trans,
|
||||||
int create_table_mode, TABLE_LIST *table);
|
int create_table_mode, TABLE_LIST *table);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user