diff options
author | iggy@amd64.(none) <> | 2007-06-21 12:52:20 -0400 |
---|---|---|
committer | iggy@amd64.(none) <> | 2007-06-21 12:52:20 -0400 |
commit | 1378e94aa0a3b8ee2d3ecd5d55c732e8b07f96d6 (patch) | |
tree | cdd67f4b72db4c76ed318460b653b00d231eb6e8 /myisam | |
parent | 840344589e4f11b1b23fb2c9dbc71fdaabff943c (diff) | |
parent | 39416f50a5afc7569295b0be7b2a2a97769d94d5 (diff) | |
download | mariadb-git-1378e94aa0a3b8ee2d3ecd5d55c732e8b07f96d6.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into amd64.(none):/src/bug27029/my50-bug27029
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/sort.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/myisam/sort.c b/myisam/sort.c index f918283503e..f48161b7c8e 100644 --- a/myisam/sort.c +++ b/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 |