Skip to content

Commit 4e98eee

Browse files
committed
Non-functional change - use bool instead of ibool in dict0stats.cc
1 parent 8fcbfa9 commit 4e98eee

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

storage/innobase/dict/dict0stats.cc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ from that level */
139139
Checks whether the persistent statistics storage exists and that all
140140
tables have the proper structure.
141141
dict_stats_persistent_storage_check() @{
142-
@return TRUE if exists and all tables are ok */
142+
@return true if exists and all tables are ok */
143143
static
144-
ibool
144+
bool
145145
dict_stats_persistent_storage_check(
146146
/*================================*/
147-
ibool caller_has_dict_sys_mutex) /*!< in: TRUE if the caller
147+
bool caller_has_dict_sys_mutex) /*!< in: true if the caller
148148
owns dict_sys->mutex */
149149
{
150150
/* definition for the table TABLE_STATS_NAME */
@@ -234,11 +234,11 @@ dict_stats_persistent_storage_check(
234234
if (ret != DB_SUCCESS) {
235235
ut_print_timestamp(stderr);
236236
fprintf(stderr, " InnoDB: Error: %s\n", errstr);
237-
return(FALSE);
237+
return(false);
238238
}
239239
/* else */
240240

241-
return(TRUE);
241+
return(true);
242242
}
243243
/* @} */
244244

@@ -261,7 +261,7 @@ dict_stats_exec_sql(
261261
ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX));
262262
ut_ad(mutex_own(&dict_sys->mutex));
263263

264-
if (!dict_stats_persistent_storage_check(TRUE)) {
264+
if (!dict_stats_persistent_storage_check(true)) {
265265
pars_info_free(pinfo);
266266
return(DB_STATS_DO_NOT_EXIST);
267267
}
@@ -1798,7 +1798,7 @@ dict_stats_analyze_index(
17981798
keys (on n_prefix columns) is L, we continue from L when
17991799
searching for D distinct keys on n_prefix-1 columns. */
18001800
level = root_level;
1801-
level_is_analyzed = FALSE;
1801+
level_is_analyzed = false;
18021802

18031803
for (n_prefix = n_uniq; n_prefix >= 1; n_prefix--) {
18041804

@@ -1844,7 +1844,7 @@ dict_stats_analyze_index(
18441844
< N_DIFF_REQUIRED(index));
18451845

18461846
level--;
1847-
level_is_analyzed = FALSE;
1847+
level_is_analyzed = false;
18481848
}
18491849

18501850
/* descend into the tree, searching for "good enough" level */
@@ -1878,7 +1878,7 @@ dict_stats_analyze_index(
18781878
/* step one level back and be satisfied with
18791879
whatever it contains */
18801880
level++;
1881-
level_is_analyzed = TRUE;
1881+
level_is_analyzed = true;
18821882

18831883
break;
18841884
}
@@ -1891,7 +1891,7 @@ dict_stats_analyze_index(
18911891
n_diff_boundaries,
18921892
&mtr);
18931893

1894-
level_is_analyzed = TRUE;
1894+
level_is_analyzed = true;
18951895

18961896
if (n_diff_on_level[n_prefix] >= N_DIFF_REQUIRED(index)
18971897
|| level == 1) {
@@ -1902,7 +1902,7 @@ dict_stats_analyze_index(
19021902
}
19031903

19041904
level--;
1905-
level_is_analyzed = FALSE;
1905+
level_is_analyzed = false;
19061906
}
19071907
found_level:
19081908

@@ -2404,7 +2404,7 @@ dict_stats_fetch_table_stats_step(
24042404
dict_stats_fetch_index_stats_step(). */
24052405
typedef struct index_fetch_struct {
24062406
dict_table_t* table; /*!< table whose indexes are to be modified */
2407-
ibool stats_were_modified; /*!< will be set to TRUE if at
2407+
bool stats_were_modified; /*!< will be set to true if at
24082408
least one index stats were modified */
24092409
} index_fetch_t;
24102410

@@ -2563,12 +2563,12 @@ dict_stats_fetch_index_stats_step(
25632563
if (stat_name_len == 4 /* strlen("size") */
25642564
&& strncasecmp("size", stat_name, stat_name_len) == 0) {
25652565
index->stat_index_size = (ulint) stat_value;
2566-
arg->stats_were_modified = TRUE;
2566+
arg->stats_were_modified = true;
25672567
} else if (stat_name_len == 12 /* strlen("n_leaf_pages") */
25682568
&& strncasecmp("n_leaf_pages", stat_name, stat_name_len)
25692569
== 0) {
25702570
index->stat_n_leaf_pages = (ulint) stat_value;
2571-
arg->stats_were_modified = TRUE;
2571+
arg->stats_were_modified = true;
25722572
} else if (stat_name_len > PFX_LEN /* e.g. stat_name=="n_diff_pfx01" */
25732573
&& strncasecmp(PFX, stat_name, PFX_LEN) == 0) {
25742574

@@ -2642,7 +2642,7 @@ dict_stats_fetch_index_stats_step(
26422642
index->stat_n_sample_sizes[n_pfx] = 0;
26432643
}
26442644

2645-
arg->stats_were_modified = TRUE;
2645+
arg->stats_were_modified = true;
26462646
} else {
26472647
/* silently ignore rows with unknown stat_name, the
26482648
user may have developed her own stats */
@@ -2695,7 +2695,7 @@ dict_stats_fetch_from_ps(
26952695
table);
26962696

26972697
index_fetch_arg.table = table;
2698-
index_fetch_arg.stats_were_modified = FALSE;
2698+
index_fetch_arg.stats_were_modified = false;
26992699
pars_info_bind_function(pinfo,
27002700
"fetch_index_stats_step",
27012701
dict_stats_fetch_index_stats_step,
@@ -2792,7 +2792,7 @@ dict_stats_update_for_index(
27922792

27932793
if (dict_stats_is_persistent_enabled(index->table)) {
27942794

2795-
if (dict_stats_persistent_storage_check(FALSE)) {
2795+
if (dict_stats_persistent_storage_check(false)) {
27962796
dict_table_stats_lock(index->table, RW_X_LATCH);
27972797
dict_stats_analyze_index(index);
27982798
dict_table_stats_unlock(index->table, RW_X_LATCH);
@@ -2876,7 +2876,7 @@ dict_stats_update(
28762876
before calling the potentially slow function
28772877
dict_stats_update_persistent(); that is a
28782878
prerequisite for dict_stats_save() succeeding */
2879-
if (dict_stats_persistent_storage_check(FALSE)) {
2879+
if (dict_stats_persistent_storage_check(false)) {
28802880

28812881
dberr_t err;
28822882

@@ -2923,7 +2923,7 @@ dict_stats_update(
29232923

29242924
if (dict_stats_is_persistent_enabled(table)) {
29252925

2926-
if (dict_stats_persistent_storage_check(FALSE)) {
2926+
if (dict_stats_persistent_storage_check(false)) {
29272927

29282928
return(dict_stats_save(table));
29292929
}
@@ -2956,7 +2956,7 @@ dict_stats_update(
29562956
persistent stats enabled */
29572957
ut_a(strchr(table->name, '/') != NULL);
29582958

2959-
if (!dict_stats_persistent_storage_check(FALSE)) {
2959+
if (!dict_stats_persistent_storage_check(false)) {
29602960
/* persistent statistics storage does not exist
29612961
or is corrupted, calculate the transient stats */
29622962

0 commit comments

Comments
 (0)