summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-09-02 15:22:32 +0300
committerGeorgi Kodinov <joro@sun.com>2009-09-02 15:22:32 +0300
commit09feff3dabccc613753261b2194f950f8e9b3988 (patch)
tree4e874dd0856773d0ac0271677026a5bd6c0b3daf
parentca4545fabc967d6fe5855021a90ef70b7117cc23 (diff)
parent3d05ec6ecfcdf07d7c744af51f34769d3eb7949d (diff)
downloadmariadb-git-09feff3dabccc613753261b2194f950f8e9b3988.tar.gz
automerge
-rw-r--r--mysys/mf_iocache.c17
-rw-r--r--storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp7
2 files changed, 16 insertions, 8 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 41f7b1cae7d..1a47982b221 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -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)
diff --git a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
index 5300d5bbfd9..c107baca39f 100644
--- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
@@ -106,8 +106,13 @@ void
AsyncFile::doStart()
{
// Stacksize for filesystem threads
- // An 8k stack should be enough
+#if !defined(DBUG_OFF) && defined (__hpux)
+ // Empirical evidence indicates at least 32k
+ const NDB_THREAD_STACKSIZE stackSize = 32768;
+#else
+ // Otherwise an 8k stack should be enough
const NDB_THREAD_STACKSIZE stackSize = 8192;
+#endif
char buf[16];
numAsyncFiles++;