automerge
This commit is contained in:
commit
f68c3c0a6e
@ -227,18 +227,21 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
size_t buffer_block;
|
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)
|
if (cachesize < min_cache)
|
||||||
cachesize = min_cache;
|
cachesize = min_cache;
|
||||||
buffer_block= cachesize;
|
buffer_block= cachesize;
|
||||||
if (type == SEQ_READ_APPEND)
|
if (type == SEQ_READ_APPEND)
|
||||||
buffer_block *= 2;
|
buffer_block *= 2;
|
||||||
/*
|
if (cachesize == min_cache)
|
||||||
Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with
|
flags|= (myf) MY_WME;
|
||||||
MY_ZEROFILL.
|
|
||||||
*/
|
if ((info->buffer= (uchar*) my_malloc(buffer_block, flags)) != 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)
|
||||||
|
@ -106,8 +106,13 @@ void
|
|||||||
AsyncFile::doStart()
|
AsyncFile::doStart()
|
||||||
{
|
{
|
||||||
// Stacksize for filesystem threads
|
// 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;
|
const NDB_THREAD_STACKSIZE stackSize = 8192;
|
||||||
|
#endif
|
||||||
|
|
||||||
char buf[16];
|
char buf[16];
|
||||||
numAsyncFiles++;
|
numAsyncFiles++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user