Skip to content

Commit 010f535

Browse files
committed
cleanup: remove redundant arguments
1 parent bf5cc31 commit 010f535

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

sql/sql_insert.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4523,9 +4523,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
45234523
open_table().
45244524
*/
45254525

4526-
if (!mysql_create_table_no_lock(thd, &create_table->db,
4527-
&create_table->table_name,
4528-
create_info, alter_info, NULL,
4526+
if (!mysql_create_table_no_lock(thd, create_info, alter_info, NULL,
45294527
select_field_count, create_table))
45304528
{
45314529
DEBUG_SYNC(thd,"create_table_select_before_open");

sql/sql_table.cc

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5449,16 +5449,16 @@ int create_table_impl(THD *thd, const LEX_CSTRING &orig_db,
54495449
-1 Table was used with IF NOT EXISTS and table existed (warning, not error)
54505450
*/
54515451

5452-
int mysql_create_table_no_lock(THD *thd, const LEX_CSTRING *db,
5453-
const LEX_CSTRING *table_name,
5454-
Table_specification_st *create_info,
5452+
int mysql_create_table_no_lock(THD *thd, Table_specification_st *create_info,
54555453
Alter_info *alter_info, bool *is_trans,
54565454
int create_table_mode, TABLE_LIST *table_list)
54575455
{
54585456
KEY *not_used_1;
54595457
uint not_used_2;
54605458
int res;
54615459
char path[FN_REFLEN + 1];
5460+
const LEX_CSTRING *db= &table_list->db;
5461+
const LEX_CSTRING *table_name= &table_list->table_name;
54625462
LEX_CUSTRING frm= {0,0};
54635463

54645464
if (create_info->tmp_table())
@@ -5635,11 +5635,8 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table,
56355635
/* We can abort create table for any table type */
56365636
thd->abort_on_warning= thd->is_strict_mode();
56375637

5638-
if (mysql_create_table_no_lock(thd, &create_table->db,
5639-
&create_table->table_name, create_info,
5640-
alter_info,
5641-
&is_trans, create_table_mode,
5642-
create_table) > 0)
5638+
if (mysql_create_table_no_lock(thd, create_info, alter_info, &is_trans,
5639+
create_table_mode, create_table) > 0)
56435640
{
56445641
result= 1;
56455642
goto err;
@@ -6116,10 +6113,8 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
61166113
pos_in_locked_tables= local_create_info.table->pos_in_locked_tables;
61176114

61186115
res= ((create_res=
6119-
mysql_create_table_no_lock(thd, &table->db, &table->table_name,
6120-
&local_create_info, &local_alter_info,
6121-
&is_trans, C_ORDINARY_CREATE,
6122-
table)) > 0);
6116+
mysql_create_table_no_lock(thd, &local_create_info, &local_alter_info,
6117+
&is_trans, C_ORDINARY_CREATE, table)) > 0);
61236118
/* Remember to log if we deleted something */
61246119
do_logging= thd->log_current_statement;
61256120
if (res)

sql/sql_table.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,7 @@ bool add_keyword_to_query(THD *thd, String *result, const LEX_CSTRING *keyword,
194194
#define C_ALTER_TABLE_FRM_ONLY -2
195195
#define C_ASSISTED_DISCOVERY -3
196196

197-
int mysql_create_table_no_lock(THD *thd, const LEX_CSTRING *db,
198-
const LEX_CSTRING *table_name,
199-
Table_specification_st *create_info,
197+
int mysql_create_table_no_lock(THD *thd, Table_specification_st *create_info,
200198
Alter_info *alter_info, bool *is_trans,
201199
int create_table_mode, TABLE_LIST *table);
202200

0 commit comments

Comments
 (0)