mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Remove redundant if-statement in Index_prefix_calc::get_avg_frequency
the code went like this: for ( ... ; i < prefixes ; ...) { if (i < prefixes) { ...
This commit is contained in:
@@ -2077,12 +2077,9 @@ public:
|
||||
|
||||
for (i= 0, state= calc_state; i < prefixes; i++, state++)
|
||||
{
|
||||
if (i < prefixes)
|
||||
{
|
||||
double val= state->prefix_count == 0 ?
|
||||
0 : (double) state->entry_count / state->prefix_count;
|
||||
index_info->collected_stats->set_avg_frequency(i, val);
|
||||
}
|
||||
double val= state->prefix_count == 0 ?
|
||||
0 : (double) state->entry_count / state->prefix_count;
|
||||
index_info->collected_stats->set_avg_frequency(i, val);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user