Commit b1a7ae79 authored by unknown's avatar unknown

Merge damien-katzs-computer.local:/Users/dkatz/mysql50

into  damien-katzs-computer.local:/Users/dkatz/mysql51


sql/filesort.cc:
  Auto merged
parents 4e77a4ce c2d3fb6b
...@@ -376,7 +376,7 @@ static BUFFPEK *read_buffpek_from_file(IO_CACHE *buffpek_pointers, uint count) ...@@ -376,7 +376,7 @@ static BUFFPEK *read_buffpek_from_file(IO_CACHE *buffpek_pointers, uint count)
ulong length; ulong length;
BUFFPEK *tmp; BUFFPEK *tmp;
DBUG_ENTER("read_buffpek_from_file"); DBUG_ENTER("read_buffpek_from_file");
if ((ulong)count > ULONG_MAX/sizeof(BUFFPEK)) if (count > UINT_MAX/sizeof(BUFFPEK))
return 0; /* sizeof(BUFFPEK)*count will overflow */ return 0; /* sizeof(BUFFPEK)*count will overflow */
tmp=(BUFFPEK*) my_malloc(length=sizeof(BUFFPEK)*count, MYF(MY_WME)); tmp=(BUFFPEK*) my_malloc(length=sizeof(BUFFPEK)*count, MYF(MY_WME));
if (tmp) if (tmp)
...@@ -629,7 +629,7 @@ write_keys(SORTPARAM *param, register uchar **sort_keys, uint count, ...@@ -629,7 +629,7 @@ write_keys(SORTPARAM *param, register uchar **sort_keys, uint count,
MYF(MY_WME))) MYF(MY_WME)))
goto err; /* purecov: inspected */ goto err; /* purecov: inspected */
/* check we won't have more buffpeks than we can possibly keep in memory */ /* check we won't have more buffpeks than we can possibly keep in memory */
if (my_b_tell(buffpek_pointers) + sizeof(BUFFPEK) > (ulonglong)ULONG_MAX) if (my_b_tell(buffpek_pointers) + sizeof(BUFFPEK) > (ulonglong)UINT_MAX)
goto err; goto err;
buffpek.file_pos= my_b_tell(tempfile); buffpek.file_pos= my_b_tell(tempfile);
if ((ha_rows) count > param->max_rows) if ((ha_rows) count > param->max_rows)
......
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