Commit acc077ff authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-34443 ha_innobase::info_low() does not distinguish HA_STATUS_VARIABLE_EXTRA

ha_innobase::info_low(): For HA_STATUS_VARIABLE without
HA_STATUS_VARIABLE_EXTRA, let us avoid unnecessary and costly updates
of the data_free statistics, which are only needed for SHOW TABLE STATUS.
This optimization had been enabled in
commit 247ecb75 but not utilized until now.
parent 3d2e54ff
......@@ -14493,11 +14493,13 @@ ha_innobase::info_low(
stats.index_file_length
= ulonglong(stat_sum_of_other_index_sizes)
* size;
rw_lock_s_lock(&space->latch);
stats.delete_length = 1024
* fsp_get_available_space_in_free_extents(
if (flag & HA_STATUS_VARIABLE_EXTRA) {
rw_lock_s_lock(&space->latch);
stats.delete_length = 1024
* fsp_get_available_space_in_free_extents(
*space);
rw_lock_s_unlock(&space->latch);
rw_lock_s_unlock(&space->latch);
}
}
stats.check_time = 0;
stats.mrr_length_per_rec= (uint)ref_length + 8; // 8 = max(sizeof(void *));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment