Skip to content

Commit e9bc0f7

Browse files
committed
MDEV-5834 cleanup: Inline two tiny functions
1 parent 1d526f3 commit e9bc0f7

File tree

3 files changed

+13
-40
lines changed

3 files changed

+13
-40
lines changed

storage/innobase/dict/dict0stats.cc

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -546,29 +546,6 @@ dict_stats_empty_index(
546546
}
547547
}
548548

549-
/**********************************************************************//**
550-
Clear defragmentation summary. */
551-
UNIV_INTERN
552-
void
553-
dict_stats_empty_defrag_summary(
554-
/*==================*/
555-
dict_index_t* index) /*!< in: index to clear defragmentation stats */
556-
{
557-
index->stat_defrag_n_pages_freed = 0;
558-
}
559-
560-
/**********************************************************************//**
561-
Clear defragmentation related index stats. */
562-
UNIV_INTERN
563-
void
564-
dict_stats_empty_defrag_stats(
565-
/*==================*/
566-
dict_index_t* index) /*!< in: index to clear defragmentation stats */
567-
{
568-
index->stat_defrag_modified_counter = 0;
569-
index->stat_defrag_n_page_split = 0;
570-
}
571-
572549
/*********************************************************************//**
573550
Write all zeros (or 1 where it makes sense) into a table and its indexes'
574551
statistics members. The resulting stats correspond to an empty table. */

storage/innobase/include/dict0mem.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,6 +1840,19 @@ dict_col_get_spatial_status(
18401840
return(spatial_status);
18411841
}
18421842

1843+
/** Clear defragmentation summary. */
1844+
inline void dict_stats_empty_defrag_summary(dict_index_t* index)
1845+
{
1846+
index->stat_defrag_n_pages_freed = 0;
1847+
}
1848+
1849+
/** Clear defragmentation related index stats. */
1850+
inline void dict_stats_empty_defrag_stats(dict_index_t* index)
1851+
{
1852+
index->stat_defrag_modified_counter = 0;
1853+
index->stat_defrag_n_page_split = 0;
1854+
}
1855+
18431856
#include "dict0mem.ic"
18441857

18451858
#endif /* dict0mem_h */

storage/innobase/include/dict0stats.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -206,23 +206,6 @@ dberr_t
206206
dict_stats_save_defrag_stats(
207207
dict_index_t* index); /*!< in: index */
208208

209-
/**********************************************************************//**
210-
Clear defragmentation summary. */
211-
UNIV_INTERN
212-
void
213-
dict_stats_empty_defrag_summary(
214-
/*==================*/
215-
dict_index_t* index); /*!< in: index to clear defragmentation stats */
216-
217-
/**********************************************************************//**
218-
Clear defragmentation related index stats. */
219-
UNIV_INTERN
220-
void
221-
dict_stats_empty_defrag_stats(
222-
/*==================*/
223-
dict_index_t* index); /*!< in: index to clear defragmentation stats */
224-
225-
226209
/*********************************************************************//**
227210
Renames an index in InnoDB persistent stats storage.
228211
This function creates its own transaction and commits it.

0 commit comments

Comments
 (0)