mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-22535 TABLE::initialize_quick_structures() takes 0.5% in oltp_read_only
- Removed not needed bzero in void TABLE::initialize_quick_structures(). - Replaced bzero with TRASH_ALLOC() to have this change verfied with memory checkers - Added missing table->quick_keys.is_set in table_cond_selectivity()
This commit is contained in:
@ -8573,7 +8573,7 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
|
|||||||
/*
|
/*
|
||||||
Check if we have a prefix of key=const that matches a quick select.
|
Check if we have a prefix of key=const that matches a quick select.
|
||||||
*/
|
*/
|
||||||
if (!is_hash_join_key_no(key))
|
if (!is_hash_join_key_no(key) && table->quick_keys.is_set(key))
|
||||||
{
|
{
|
||||||
key_part_map quick_key_map= (key_part_map(1) << table->quick_key_parts[key]) - 1;
|
key_part_map quick_key_map= (key_part_map(1) << table->quick_key_parts[key]) - 1;
|
||||||
if (table->quick_rows[key] &&
|
if (table->quick_rows[key] &&
|
||||||
|
@ -9358,10 +9358,10 @@ bool TABLE::export_structure(THD *thd, Row_definition_list *defs)
|
|||||||
|
|
||||||
void TABLE::initialize_quick_structures()
|
void TABLE::initialize_quick_structures()
|
||||||
{
|
{
|
||||||
bzero(quick_rows, sizeof(quick_rows));
|
TRASH_ALLOC(quick_rows, sizeof(quick_rows));
|
||||||
bzero(quick_key_parts, sizeof(quick_key_parts));
|
TRASH_ALLOC(quick_key_parts, sizeof(quick_key_parts));
|
||||||
bzero(quick_costs, sizeof(quick_costs));
|
TRASH_ALLOC(quick_costs, sizeof(quick_costs));
|
||||||
bzero(quick_n_ranges, sizeof(quick_n_ranges));
|
TRASH_ALLOC(quick_n_ranges, sizeof(quick_n_ranges));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user