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