Commit 311f0308 authored by Jan Lindström's avatar Jan Lindström

MDEV-9148: Assertion `thd->stmt_arena != thd->progress.arena' failed in thd_progress_init

Called thd_progress_init() from several threads used for FT-index
creation. For FT-indexes, need better way to report progress,
remove current one for them.
parent 6eb86763
......@@ -2327,7 +2327,10 @@ row_merge_sort(
of file marker). Thus, it must be at least one block. */
ut_ad(file->offset > 0);
thd_progress_init(trx->mysql_thd, 1);
/* Progress report only for "normal" indexes. */
if (!(dup->index->type & DICT_FTS)) {
thd_progress_init(trx->mysql_thd, 1);
}
/* Merge the runs until we have one big run */
do {
......@@ -2335,8 +2338,11 @@ row_merge_sort(
&num_runs, run_offset);
/* Report progress of merge sort to MySQL for
show processlist progress field */
thd_progress_report(trx->mysql_thd, file->offset - num_runs, file->offset);
show processlist progress field only for
"normal" indexes. */
if (!(dup->index->type & DICT_FTS)) {
thd_progress_report(trx->mysql_thd, file->offset - num_runs, file->offset);
}
if (error != DB_SUCCESS) {
break;
......@@ -2347,7 +2353,9 @@ row_merge_sort(
mem_free(run_offset);
thd_progress_end(trx->mysql_thd);
if (!(dup->index->type & DICT_FTS)) {
thd_progress_end(trx->mysql_thd);
}
DBUG_RETURN(error);
}
......
......@@ -2335,7 +2335,10 @@ row_merge_sort(
of file marker). Thus, it must be at least one block. */
ut_ad(file->offset > 0);
thd_progress_init(trx->mysql_thd, 1);
/* Progress report only for "normal" indexes. */
if (!(dup->index->type & DICT_FTS)) {
thd_progress_init(trx->mysql_thd, 1);
}
/* Merge the runs until we have one big run */
do {
......@@ -2343,8 +2346,12 @@ row_merge_sort(
&num_runs, run_offset);
/* Report progress of merge sort to MySQL for
show processlist progress field */
thd_progress_report(trx->mysql_thd, file->offset - num_runs, file->offset);
show processlist progress field only for
"normal" indexes. */
if (!(dup->index->type & DICT_FTS)) {
thd_progress_report(trx->mysql_thd, file->offset - num_runs, file->offset);
}
if (error != DB_SUCCESS) {
break;
......@@ -2355,7 +2362,9 @@ row_merge_sort(
mem_free(run_offset);
thd_progress_end(trx->mysql_thd);
if (!(dup->index->type & DICT_FTS)) {
thd_progress_end(trx->mysql_thd);
}
DBUG_RETURN(error);
}
......
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