diff options
author | unknown <iggy@amd64.(none)> | 2007-06-21 12:53:03 -0400 |
---|---|---|
committer | unknown <iggy@amd64.(none)> | 2007-06-21 12:53:03 -0400 |
commit | 772d158ee29956821b4a145bfa89fa08bca6978b (patch) | |
tree | 704e9dc2d3029bd47123bf7384f5187cb7cc99ea /storage | |
parent | 02faba53a67cb78905148c06917bf00e9140a382 (diff) | |
parent | c5559f08cf154862637dc2eacf43ff7185b74f9f (diff) | |
download | mariadb-git-772d158ee29956821b4a145bfa89fa08bca6978b.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into amd64.(none):/src/bug27029/my51-bug27029
storage/myisam/sort.c:
Auto merged
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/sort.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c index 2abfa749d46..bf3281e7d32 100644 --- a/storage/myisam/sort.c +++ b/storage/myisam/sort.c @@ -138,8 +138,9 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, while (memavl >= MIN_SORT_MEMORY) { - if ((my_off_t) (records+1)*(sort_length+sizeof(char*)) <= - (my_off_t) memavl) + if ((records < UINT_MAX32) && + ((my_off_t) (records + 1) * + (sort_length + sizeof(char*)) <= (my_off_t) memavl)) keys= records+1; else do |