Skip to content

Commit 7fca91f

Browse files
committed
cleanup: InnoDB, dict_create_add_foreign_to_dictionary()
remove 'table' argument, remnant of 5.6, does not exist in 5.7
1 parent 528dd5f commit 7fca91f

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

storage/innobase/dict/dict0crea.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,7 +2189,6 @@ Add a foreign key definition to the data dictionary tables.
21892189
dberr_t
21902190
dict_create_add_foreign_to_dictionary(
21912191
/*==================================*/
2192-
dict_table_t* table, /*!< in: table */
21932192
const char* name, /*!< in: table name */
21942193
const dict_foreign_t* foreign,/*!< in: foreign key */
21952194
trx_t* trx) /*!< in/out: dictionary transaction */
@@ -2231,8 +2230,7 @@ dict_create_add_foreign_to_dictionary(
22312230
char* fk_def;
22322231

22332232
innobase_convert_name(tablename, MAX_TABLE_NAME_LEN,
2234-
table->name.m_name, strlen(table->name.m_name),
2235-
trx->mysql_thd);
2233+
name, strlen(name), trx->mysql_thd);
22362234

22372235
innobase_convert_name(buf, MAX_TABLE_NAME_LEN,
22382236
foreign->id, strlen(foreign->id), trx->mysql_thd);
@@ -2263,8 +2261,7 @@ dict_create_add_foreign_to_dictionary(
22632261
char* fk_def;
22642262

22652263
innobase_convert_name(tablename, MAX_TABLE_NAME_LEN,
2266-
table->name.m_name, strlen(table->name.m_name),
2267-
trx->mysql_thd);
2264+
name, strlen(name), trx->mysql_thd);
22682265
innobase_convert_name(buf, MAX_TABLE_NAME_LEN,
22692266
foreign->id, strlen(foreign->id), trx->mysql_thd);
22702267
fk_def = dict_foreign_def_get((dict_foreign_t*)foreign, trx);
@@ -2513,7 +2510,7 @@ dict_create_add_foreigns_to_dictionary(
25132510
ut_ad(foreign->id != NULL);
25142511

25152512
error = dict_create_add_foreign_to_dictionary(
2516-
(dict_table_t*)table, table->name.m_name, foreign, trx);
2513+
table->name.m_name, foreign, trx);
25172514

25182515
if (error != DB_SUCCESS) {
25192516

storage/innobase/handler/handler0alter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7697,7 +7697,7 @@ innobase_update_foreign_try(
76977697
names, while the columns in ctx->old_table have not
76987698
been renamed yet. */
76997699
error = dict_create_add_foreign_to_dictionary(
7700-
(dict_table_t*)ctx->old_table,ctx->old_table->name.m_name, fk, trx);
7700+
ctx->old_table->name.m_name, fk, trx);
77017701

77027702
DBUG_EXECUTE_IF(
77037703
"innodb_test_cannot_add_fk_system",

storage/innobase/include/dict0crea.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ Add a foreign key definition to the data dictionary tables.
276276
dberr_t
277277
dict_create_add_foreign_to_dictionary(
278278
/*==================================*/
279-
dict_table_t* table, /*!< in: table */
280279
const char* name, /*!< in: table name */
281280
const dict_foreign_t* foreign,/*!< in: foreign key */
282281
trx_t* trx) /*!< in/out: dictionary transaction */

0 commit comments

Comments
 (0)