Bug #27119 server crash with integer division by zero during filesort on huge result

Fixed a compiler warning on platforms where uint != ulong from the first pushed fix.


sql/filesort.cc:
  fixed a compiler warning on platforms where uint != ulong
This commit is contained in:
unknown 2007-05-17 17:54:31 -04:00
commit 9d3e7ea664

View file

@ -370,7 +370,7 @@ static BUFFPEK *read_buffpek_from_file(IO_CACHE *buffpek_pointers, uint count)
ulong length;
BUFFPEK *tmp;
DBUG_ENTER("read_buffpek_from_file");
if (count > ULONG_MAX/sizeof(BUFFPEK))
if ((ulong)count > ULONG_MAX/sizeof(BUFFPEK))
return 0; /* sizeof(BUFFPEK)*count will overflow */
tmp=(BUFFPEK*) my_malloc(length=sizeof(BUFFPEK)*count, MYF(MY_WME));
if (tmp)