Commit 69bc6dd0 authored by Jimmy Yang's avatar Jimmy Yang

Fix an overly asserted assertion during previous checkin for bug #54330.

parent 3c0be2c7
...@@ -1666,7 +1666,7 @@ row_merge( ...@@ -1666,7 +1666,7 @@ row_merge(
return(DB_CORRUPTION); return(DB_CORRUPTION);
} }
ut_ad(n_run < *num_run); ut_ad(n_run <= *num_run);
*num_run = n_run; *num_run = n_run;
...@@ -1714,6 +1714,11 @@ row_merge_sort( ...@@ -1714,6 +1714,11 @@ row_merge_sort(
/* Record the number of merge runs we need to perform */ /* Record the number of merge runs we need to perform */
num_runs = file->offset; num_runs = file->offset;
/* If num_runs are less than 1, nothing to merge */
if (num_runs <= 1) {
return(error);
}
/* "run_offset" records each run's first offset number */ /* "run_offset" records each run's first offset number */
run_offset = (ulint*) mem_alloc(file->offset * sizeof(ulint)); run_offset = (ulint*) mem_alloc(file->offset * sizeof(ulint));
......
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