Browse Source

MDEV-12625 total_index_blocks is uninitialized in ALTER TABLE…ALGORITHM=INPLACE of small tables

Before MDEV-6812, it did not matter that merge_files[].offset was
uninitialized when no files were created.

This problem was introduced in MDEV-6812. There could be a user-visible
impact that the progress reports spit into the error log are bogus.

row_merge_build_indexes(): Initialize merge_files[i].offset.
pull/217/merge
Marko Mäkelä 9 years ago
parent
commit
7e0f40b333
  1. 1
      storage/innobase/row/row0merge.cc
  2. 1
      storage/xtradb/row/row0merge.cc

1
storage/innobase/row/row0merge.cc

@ -4035,6 +4035,7 @@ row_merge_build_indexes(
for (i = 0; i < n_indexes; i++) {
merge_files[i].fd = -1;
merge_files[i].offset = 0;
}
total_static_cost = COST_BUILD_INDEX_STATIC * n_indexes + COST_READ_CLUSTERED_INDEX;

1
storage/xtradb/row/row0merge.cc

@ -4037,6 +4037,7 @@ row_merge_build_indexes(
for (i = 0; i < n_indexes; i++) {
merge_files[i].fd = -1;
merge_files[i].offset = 0;
}
total_static_cost = COST_BUILD_INDEX_STATIC * n_indexes + COST_READ_CLUSTERED_INDEX;

Loading…
Cancel
Save