merging bugfix from 5.0

This commit is contained in:
Anurag Shekhar 2009-08-31 13:26:09 +05:30
commit e3f7f7a5c9

View File

@ -232,10 +232,13 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
buffer_block= cachesize; buffer_block= cachesize;
if (type == SEQ_READ_APPEND) if (type == SEQ_READ_APPEND)
buffer_block *= 2; buffer_block *= 2;
if ((info->buffer= /*
(uchar*) my_malloc(buffer_block, Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with
MYF((cache_myflags & ~ MY_WME) | MY_ZEROFILL.
(cachesize == min_cache ? MY_WME : 0)))) != 0) */
myf flag = MYF((cache_myflags & ~ (MY_WME | MY_WAIT_IF_FULL)) |
(cachesize == min_cache ? MY_WME : 0));
if ((info->buffer= (uchar*) my_malloc(buffer_block, flag)) != 0)
{ {
info->write_buffer=info->buffer; info->write_buffer=info->buffer;
if (type == SEQ_READ_APPEND) if (type == SEQ_READ_APPEND)