@@ -139,12 +139,12 @@ from that level */
139
139
Checks whether the persistent statistics storage exists and that all
140
140
tables have the proper structure.
141
141
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 */
143
143
static
144
- ibool
144
+ bool
145
145
dict_stats_persistent_storage_check (
146
146
/* ================================*/
147
- ibool caller_has_dict_sys_mutex) /* !< in: TRUE if the caller
147
+ bool caller_has_dict_sys_mutex) /* !< in: true if the caller
148
148
owns dict_sys->mutex */
149
149
{
150
150
/* definition for the table TABLE_STATS_NAME */
@@ -234,11 +234,11 @@ dict_stats_persistent_storage_check(
234
234
if (ret != DB_SUCCESS) {
235
235
ut_print_timestamp (stderr);
236
236
fprintf (stderr, " InnoDB: Error: %s\n " , errstr);
237
- return (FALSE );
237
+ return (false );
238
238
}
239
239
/* else */
240
240
241
- return (TRUE );
241
+ return (true );
242
242
}
243
243
/* @} */
244
244
@@ -261,7 +261,7 @@ dict_stats_exec_sql(
261
261
ut_ad (rw_lock_own (&dict_operation_lock, RW_LOCK_EX));
262
262
ut_ad (mutex_own (&dict_sys->mutex ));
263
263
264
- if (!dict_stats_persistent_storage_check (TRUE )) {
264
+ if (!dict_stats_persistent_storage_check (true )) {
265
265
pars_info_free (pinfo);
266
266
return (DB_STATS_DO_NOT_EXIST);
267
267
}
@@ -1798,7 +1798,7 @@ dict_stats_analyze_index(
1798
1798
keys (on n_prefix columns) is L, we continue from L when
1799
1799
searching for D distinct keys on n_prefix-1 columns. */
1800
1800
level = root_level;
1801
- level_is_analyzed = FALSE ;
1801
+ level_is_analyzed = false ;
1802
1802
1803
1803
for (n_prefix = n_uniq; n_prefix >= 1 ; n_prefix--) {
1804
1804
@@ -1844,7 +1844,7 @@ dict_stats_analyze_index(
1844
1844
< N_DIFF_REQUIRED (index ));
1845
1845
1846
1846
level--;
1847
- level_is_analyzed = FALSE ;
1847
+ level_is_analyzed = false ;
1848
1848
}
1849
1849
1850
1850
/* descend into the tree, searching for "good enough" level */
@@ -1878,7 +1878,7 @@ dict_stats_analyze_index(
1878
1878
/* step one level back and be satisfied with
1879
1879
whatever it contains */
1880
1880
level++;
1881
- level_is_analyzed = TRUE ;
1881
+ level_is_analyzed = true ;
1882
1882
1883
1883
break ;
1884
1884
}
@@ -1891,7 +1891,7 @@ dict_stats_analyze_index(
1891
1891
n_diff_boundaries,
1892
1892
&mtr);
1893
1893
1894
- level_is_analyzed = TRUE ;
1894
+ level_is_analyzed = true ;
1895
1895
1896
1896
if (n_diff_on_level[n_prefix] >= N_DIFF_REQUIRED (index )
1897
1897
|| level == 1 ) {
@@ -1902,7 +1902,7 @@ dict_stats_analyze_index(
1902
1902
}
1903
1903
1904
1904
level--;
1905
- level_is_analyzed = FALSE ;
1905
+ level_is_analyzed = false ;
1906
1906
}
1907
1907
found_level:
1908
1908
@@ -2404,7 +2404,7 @@ dict_stats_fetch_table_stats_step(
2404
2404
dict_stats_fetch_index_stats_step(). */
2405
2405
typedef struct index_fetch_struct {
2406
2406
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
2408
2408
least one index stats were modified */
2409
2409
} index_fetch_t ;
2410
2410
@@ -2563,12 +2563,12 @@ dict_stats_fetch_index_stats_step(
2563
2563
if (stat_name_len == 4 /* strlen("size") */
2564
2564
&& strncasecmp (" size" , stat_name, stat_name_len) == 0 ) {
2565
2565
index ->stat_index_size = (ulint) stat_value;
2566
- arg->stats_were_modified = TRUE ;
2566
+ arg->stats_were_modified = true ;
2567
2567
} else if (stat_name_len == 12 /* strlen("n_leaf_pages") */
2568
2568
&& strncasecmp (" n_leaf_pages" , stat_name, stat_name_len)
2569
2569
== 0 ) {
2570
2570
index ->stat_n_leaf_pages = (ulint) stat_value;
2571
- arg->stats_were_modified = TRUE ;
2571
+ arg->stats_were_modified = true ;
2572
2572
} else if (stat_name_len > PFX_LEN /* e.g. stat_name=="n_diff_pfx01" */
2573
2573
&& strncasecmp (PFX, stat_name, PFX_LEN) == 0 ) {
2574
2574
@@ -2642,7 +2642,7 @@ dict_stats_fetch_index_stats_step(
2642
2642
index ->stat_n_sample_sizes [n_pfx] = 0 ;
2643
2643
}
2644
2644
2645
- arg->stats_were_modified = TRUE ;
2645
+ arg->stats_were_modified = true ;
2646
2646
} else {
2647
2647
/* silently ignore rows with unknown stat_name, the
2648
2648
user may have developed her own stats */
@@ -2695,7 +2695,7 @@ dict_stats_fetch_from_ps(
2695
2695
table);
2696
2696
2697
2697
index_fetch_arg.table = table;
2698
- index_fetch_arg.stats_were_modified = FALSE ;
2698
+ index_fetch_arg.stats_were_modified = false ;
2699
2699
pars_info_bind_function (pinfo,
2700
2700
" fetch_index_stats_step" ,
2701
2701
dict_stats_fetch_index_stats_step,
@@ -2792,7 +2792,7 @@ dict_stats_update_for_index(
2792
2792
2793
2793
if (dict_stats_is_persistent_enabled (index ->table )) {
2794
2794
2795
- if (dict_stats_persistent_storage_check (FALSE )) {
2795
+ if (dict_stats_persistent_storage_check (false )) {
2796
2796
dict_table_stats_lock (index ->table , RW_X_LATCH);
2797
2797
dict_stats_analyze_index (index );
2798
2798
dict_table_stats_unlock (index ->table , RW_X_LATCH);
@@ -2876,7 +2876,7 @@ dict_stats_update(
2876
2876
before calling the potentially slow function
2877
2877
dict_stats_update_persistent(); that is a
2878
2878
prerequisite for dict_stats_save() succeeding */
2879
- if (dict_stats_persistent_storage_check (FALSE )) {
2879
+ if (dict_stats_persistent_storage_check (false )) {
2880
2880
2881
2881
dberr_t err;
2882
2882
@@ -2923,7 +2923,7 @@ dict_stats_update(
2923
2923
2924
2924
if (dict_stats_is_persistent_enabled (table)) {
2925
2925
2926
- if (dict_stats_persistent_storage_check (FALSE )) {
2926
+ if (dict_stats_persistent_storage_check (false )) {
2927
2927
2928
2928
return (dict_stats_save (table));
2929
2929
}
@@ -2956,7 +2956,7 @@ dict_stats_update(
2956
2956
persistent stats enabled */
2957
2957
ut_a (strchr (table->name , ' /' ) != NULL );
2958
2958
2959
- if (!dict_stats_persistent_storage_check (FALSE )) {
2959
+ if (!dict_stats_persistent_storage_check (false )) {
2960
2960
/* persistent statistics storage does not exist
2961
2961
or is corrupted, calculate the transient stats */
2962
2962
0 commit comments