Skip to content
/ server Public

Commit 5f6109a

Browse files
committed
MDEV-38618 Unused variable dict_table_t::fk_max_recusive_level
Ever since mysql/mysql-server@3777746 was applied in commit 2e814d4702d71a04388386a9f591d14a35980bfed the data member dict_table_t::fk_max_recusive_level is never being read, only initialized as 0. Let us follow the lead of mysql/mysql-server@b22ac19 and remove this useless field.
1 parent 470487c commit 5f6109a

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

storage/innobase/dict/dict0load.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,10 +2506,6 @@ static dict_table_t *dict_load_table_one(const span<const char> &name,
25062506
}
25072507
}
25082508

2509-
/* Initialize table foreign_child value. Its value could be
2510-
changed when dict_load_foreigns() is called below */
2511-
table->fk_max_recusive_level = 0;
2512-
25132509
/* We will load the foreign key information only if
25142510
all indexes were loaded. */
25152511
if (!table->is_readable()) {
@@ -2528,7 +2524,6 @@ static dict_table_t *dict_load_table_one(const span<const char> &name,
25282524
goto evict;
25292525
} else {
25302526
dict_mem_table_fill_foreign_vcol_set(table);
2531-
table->fk_max_recusive_level = 0;
25322527
}
25332528
}
25342529

@@ -3222,9 +3217,7 @@ dict_load_foreigns(
32223217
mtr.commit();
32233218

32243219
if ((sec_index = dict_table_get_next_index(sec_index))) {
3225-
/* Switch to scan index on REF_NAME, fk_max_recusive_level
3226-
already been updated when scanning FOR_NAME index, no need to
3227-
update again */
3220+
/* Switch to scan index on REF_NAME */
32283221
check_recursive = false;
32293222
goto start_load;
32303223
}

storage/innobase/include/dict0mem.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,11 +2320,6 @@ struct dict_table_t {
23202320
/** Node of the LRU list of tables. */
23212321
UT_LIST_NODE_T(dict_table_t) table_LRU;
23222322

2323-
/** Maximum recursive level we support when loading tables chained
2324-
together with FK constraints. If exceeds this level, we will stop
2325-
loading child table into memory along with its parent table. */
2326-
byte fk_max_recusive_level;
2327-
23282323
/** DDL transaction that last touched the table definition, or 0 if
23292324
no history is available. This includes possible changes in
23302325
ha_innobase::prepare_inplace_alter_table() and

storage/innobase/row/row0mysql.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,8 +1560,6 @@ init_fts_doc_id_for_ref(
15601560
dict_table_t* table, /*!< in: table */
15611561
ulint* depth) /*!< in: recusive call depth */
15621562
{
1563-
table->fk_max_recusive_level = 0;
1564-
15651563
/* Limit on tables involved in cascading delete/update */
15661564
if (++*depth > FK_MAX_CASCADE_DEL) {
15671565
return;

0 commit comments

Comments
 (0)