Commit f076ba28 authored by Davi Arnaut's avatar Davi Arnaut

Manual merge.

parents 5109313e ca96ac53
......@@ -227,18 +227,21 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
for (;;)
{
size_t buffer_block;
/*
Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with
MY_ZEROFILL.
*/
myf flags= (myf) (cache_myflags & ~(MY_WME | MY_WAIT_IF_FULL));
if (cachesize < min_cache)
cachesize = min_cache;
buffer_block= cachesize;
if (type == SEQ_READ_APPEND)
buffer_block *= 2;
/*
Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with
MY_ZEROFILL.
*/
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)
if (cachesize == min_cache)
flags|= (myf) MY_WME;
if ((info->buffer= (uchar*) my_malloc(buffer_block, flags)) != 0)
{
info->write_buffer=info->buffer;
if (type == SEQ_READ_APPEND)
......
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