diff options
author | Georgi Kodinov <joro@sun.com> | 2009-09-02 15:33:18 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-09-02 15:33:18 +0300 |
commit | bb4c5acfb3e9a906b07d3ad7a3a131e2379807af (patch) | |
tree | b3086a32780e1bf65f507281e5a839c546d77c68 /mysys | |
parent | 6cfe48d7270ec6de3247b011ddb84b41417a6a02 (diff) | |
parent | ca96ac53518f97655e34b590463887a3e166a266 (diff) | |
download | mariadb-git-bb4c5acfb3e9a906b07d3ad7a3a131e2379807af.tar.gz |
merge
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_iocache.c | 16 | ||||
-rw-r--r-- | mysys/my_redel.c | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 3aab904a6e0..c4c48f9c121 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -228,18 +228,20 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize, for (;;) { uint 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= (byte*) my_malloc(buffer_block, flag)) != 0) + if (cachesize == min_cache) + flags|= (myf) MY_WME; + if ((info->buffer= (byte*) my_malloc(buffer_block, flags)) != 0) { info->write_buffer=info->buffer; if (type == SEQ_READ_APPEND) diff --git a/mysys/my_redel.c b/mysys/my_redel.c index 03c1021a954..116cb81f9df 100644 --- a/mysys/my_redel.c +++ b/mysys/my_redel.c @@ -77,7 +77,9 @@ end: int my_copystat(const char *from, const char *to, int MyFlags) { struct stat statbuf; +#if !defined(MSDOS) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) && !defined(__NETWARE__) int res; +#endif /* MSDOS */ if (stat((char*) from, &statbuf)) { |