Skip to content

Commit eb63646

Browse files
committed
Remove the redundant variable fil_n_file_opened
1 parent b982407 commit eb63646

File tree

6 files changed

+3
-13
lines changed

6 files changed

+3
-13
lines changed

extra/mariabackup/fil_cur.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ xb_fil_node_close_file(
110110

111111
ut_a(fil_system->n_open > 0);
112112
fil_system->n_open--;
113-
fil_n_file_opened--;
114113

115114
if (node->space->purpose == FIL_TYPE_TABLESPACE &&
116115
fil_is_user_tablespace_id(node->space->id)) {
@@ -179,7 +178,6 @@ xb_fil_cur_open(
179178
mutex_enter(&fil_system->mutex);
180179

181180
fil_system->n_open++;
182-
fil_n_file_opened++;
183181

184182
if (node->space->purpose == FIL_TYPE_TABLESPACE &&
185183
fil_is_user_tablespace_id(node->space->id)) {

storage/innobase/fil/fil0fil.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ ulint fil_n_pending_log_flushes = 0;
138138
/** Number of pending tablespace flushes */
139139
ulint fil_n_pending_tablespace_flushes = 0;
140140

141-
/** Number of files currently open */
142-
ulint fil_n_file_opened = 0;
143-
144141
/** The null file address */
145142
fil_addr_t fil_addr_null = {FIL_NULL, 0};
146143

@@ -758,7 +755,6 @@ fil_node_open_file(
758755
ut_a(node->is_open());
759756

760757
fil_system->n_open++;
761-
fil_n_file_opened++;
762758

763759
if (fil_space_belongs_in_lru(space)) {
764760

@@ -797,7 +793,6 @@ fil_node_close_file(
797793
ut_ad(!node->is_open());
798794
ut_a(fil_system->n_open > 0);
799795
fil_system->n_open--;
800-
fil_n_file_opened--;
801796

802797
if (fil_space_belongs_in_lru(node->space)) {
803798

storage/innobase/include/fil0fil.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,6 @@ extern ulint fil_n_pending_log_flushes;
443443
/** Number of pending tablespace flushes */
444444
extern ulint fil_n_pending_tablespace_flushes;
445445

446-
/** Number of files currently open */
447-
extern ulint fil_n_file_opened;
448-
449446
#ifndef UNIV_INNOCHECKSUM
450447

451448
/** Look up a tablespace.

storage/innobase/include/srv0srv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ struct export_var_t{
10201020
ulint innodb_system_rows_inserted; /*!< srv_n_system_rows_inserted */
10211021
ulint innodb_system_rows_updated; /*!< srv_n_system_rows_updated */
10221022
ulint innodb_system_rows_deleted; /*!< srv_n_system_rows_deleted*/
1023-
ulint innodb_num_open_files; /*!< fil_n_file_opened */
1023+
ulint innodb_num_open_files; /*!< fil_system_t::n_open */
10241024
ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */
10251025
ulint innodb_available_undo_logs; /*!< srv_available_undo_logs
10261026
*/

storage/innobase/srv/srv0mon.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ srv_mon_process_existing_counter(
19601960
break;
19611961

19621962
case MONITOR_OVLD_N_FILE_OPENED:
1963-
value = fil_n_file_opened;
1963+
value = fil_system->n_open;
19641964
break;
19651965

19661966
case MONITOR_OVLD_IBUF_MERGE_INSERT:

storage/innobase/srv/srv0srv.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ srv_export_innodb_status(void)
16261626
export_vars.innodb_system_rows_deleted =
16271627
srv_stats.n_system_rows_deleted;
16281628

1629-
export_vars.innodb_num_open_files = fil_n_file_opened;
1629+
export_vars.innodb_num_open_files = fil_system->n_open;
16301630

16311631
export_vars.innodb_truncated_status_writes =
16321632
srv_truncated_status_writes;

0 commit comments

Comments
 (0)