Skip to content
Permalink
Browse files
MDEV-12625 total_index_blocks is uninitialized in ALTER TABLE…ALGORIT…
…HM=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.
  • Loading branch information
dr-m committed May 23, 2017
1 parent a1b6128 commit 7e0f40b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
@@ -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;
@@ -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;

0 comments on commit 7e0f40b

Please sign in to comment.