MDEV-21269 Parallel merging of fts index rebuild fails

Problem:
=======
  - During alter rebuild, document read from old table is tokenzied
parallelly by innodb_ft_sort_pll_degree threads and stores it
in respective merge files. While doing the parallel merge, InnoDB
wrongly skips the root level selection of merging buffer records.
So it leads to insertion of merge records in non-ascending order.

Solution:
==========
  Build selection tree for the root level also. So that root of
selection tree can always contain sorted buffer.
parent 54c169a9
......@@ -1528,10 +1528,11 @@ row_fts_build_sel_tree(
sel_tree[i + start] = int(i);
}
for (i = treelevel; --i; ) {
i = treelevel;
do {
row_fts_build_sel_tree_level(
sel_tree, i, mrec, offsets, index);
}
sel_tree, --i, mrec, offsets, index);
} while (i > 0);
return(treelevel);
}
......
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