diff options
author | Anurag Shekhar <anurag.shekhar@sun.com> | 2009-08-31 13:26:09 +0530 |
---|---|---|
committer | Anurag Shekhar <anurag.shekhar@sun.com> | 2009-08-31 13:26:09 +0530 |
commit | e3f7f7a5c9a0a13440793416d0ce6bf5da9d697d (patch) | |
tree | 12a0ed6f91290d97c251f80853ce9349aafec62a /mysys | |
parent | a00ba9ebea078f7dc12f7cd298782d1ada4bb4e9 (diff) | |
parent | df51d1cea08e948bbf3aa0484af6251d79a32203 (diff) | |
download | mariadb-git-e3f7f7a5c9a0a13440793416d0ce6bf5da9d697d.tar.gz |
merging bugfix from 5.0
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_iocache.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 0f49dd22bb9..41f7b1cae7d 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -232,10 +232,13 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize, buffer_block= cachesize; if (type == SEQ_READ_APPEND) buffer_block *= 2; - if ((info->buffer= - (uchar*) my_malloc(buffer_block, - MYF((cache_myflags & ~ MY_WME) | - (cachesize == min_cache ? MY_WME : 0)))) != 0) + /* + 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) { info->write_buffer=info->buffer; if (type == SEQ_READ_APPEND) |