summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-05-17 11:42:50 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-05-17 11:43:25 +0530
commit4f26aea51b22eaf65a44d5f4d8587d2060953d35 (patch)
tree5c4ff9f011d19e6682700cae21e0973a6e4b49e9
parent54c169a986e7ac76d4a200661c3ce5712fc06040 (diff)
downloadmariadb-git-bb-10.3-MDEV-21269.tar.gz
MDEV-21269 Parallel merging of fts index rebuild failsbb-10.3-MDEV-21269
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.
-rw-r--r--storage/innobase/row/row0ftsort.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc
index ec65f295e7f..874854c2da9 100644
--- a/storage/innobase/row/row0ftsort.cc
+++ b/storage/innobase/row/row0ftsort.cc
@@ -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);
}