summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorJimmy Yang <jimmy.yang@oracle.com>2010-06-17 10:33:03 -0700
committerJimmy Yang <jimmy.yang@oracle.com>2010-06-17 10:33:03 -0700
commit69bc6dd01ce962932a1083f162b29cffc0fda834 (patch)
tree22e939a7c606cef0566354960ba8a742708ef56f /storage
parent3c0be2c7b3faf98cb0e09994f4c992160c5a62ab (diff)
downloadmariadb-git-69bc6dd01ce962932a1083f162b29cffc0fda834.tar.gz
Fix an overly asserted assertion during previous checkin for bug #54330.
Diffstat (limited to 'storage')
-rw-r--r--storage/innodb_plugin/row/row0merge.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/innodb_plugin/row/row0merge.c b/storage/innodb_plugin/row/row0merge.c
index f7bc0299b70..28e7faed1f8 100644
--- a/storage/innodb_plugin/row/row0merge.c
+++ b/storage/innodb_plugin/row/row0merge.c
@@ -1666,7 +1666,7 @@ row_merge(
return(DB_CORRUPTION);
}
- ut_ad(n_run < *num_run);
+ ut_ad(n_run <= *num_run);
*num_run = n_run;
@@ -1714,6 +1714,11 @@ row_merge_sort(
/* Record the number of merge runs we need to perform */
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 = (ulint*) mem_alloc(file->offset * sizeof(ulint));