diff options
author | unknown <svoj@april.(none)> | 2006-10-19 19:59:57 +0500 |
---|---|---|
committer | unknown <svoj@april.(none)> | 2006-10-19 19:59:57 +0500 |
commit | 9a77a540aaee949ec62038e718f0968b6f0fbcaf (patch) | |
tree | 736d1b95d46358624a54103379901ff84f1bae0a /storage | |
parent | e873878ddb6242a7cbec44d632ed6f0a993bb9c5 (diff) | |
parent | 3ad2baa17293a8e2a5dc7f3803e97b380f1c1d5d (diff) | |
download | mariadb-git-9a77a540aaee949ec62038e718f0968b6f0fbcaf.tar.gz |
Merge mysql.com:/home/svoj/devel/mysql/engines/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/engines/mysql-5.1-engines
mysql-test/t/repair.test:
Auto merged
sql/sql_base.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
mysql-test/r/repair.result:
Manual merge.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/sort.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c index 37eb1b5bde5..bdbfa91ced4 100644 --- a/storage/myisam/sort.c +++ b/storage/myisam/sort.c @@ -148,7 +148,8 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, skr=maxbuffer; if (memavl < sizeof(BUFFPEK)*(uint) maxbuffer || (keys=(memavl-sizeof(BUFFPEK)*(uint) maxbuffer)/ - (sort_length+sizeof(char*))) <= 1) + (sort_length+sizeof(char*))) <= 1 || + keys < (uint) maxbuffer) { mi_check_print_error(info->sort_info->param, "sort_buffer_size is to small"); @@ -363,7 +364,8 @@ pthread_handler_t thr_find_all_keys(void *arg) skr=maxbuffer; if (memavl < sizeof(BUFFPEK)*maxbuffer || (keys=(memavl-sizeof(BUFFPEK)*maxbuffer)/ - (sort_length+sizeof(char*))) <= 1) + (sort_length+sizeof(char*))) <= 1 || + keys < (uint) maxbuffer) { mi_check_print_error(sort_param->sort_info->param, "sort_buffer_size is to small"); @@ -501,6 +503,8 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) if (!sinfo->sort_keys) { got_error=1; + my_free(mi_get_rec_buff_ptr(info, sinfo->rec_buff), + MYF(MY_ALLOW_ZERO_PTR)); continue; } if (!got_error) |