summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 16:30:10 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 16:30:10 -0300
commit182599dd13f280ce4d51333bca98dbd5e4816bba (patch)
treec02d7fe89f0e9d9cbd05e83dd77ceeed812eb293 /mysys/mf_iocache.c
parent774194634297aebf6ecbbda7c5601c796f43e5fc (diff)
parent9a5fa17fd3c4885262e31bf14cf495d02e5f6b27 (diff)
downloadmariadb-git-182599dd13f280ce4d51333bca98dbd5e4816bba.tar.gz
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r--mysys/mf_iocache.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index daacc08044b..d9b1bfcaa7f 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -1703,16 +1703,19 @@ int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count,
#endif
-int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
+int my_b_flush_io_cache(IO_CACHE *info,
+ int need_append_buffer_lock __attribute__((unused)))
{
size_t length;
- my_bool append_cache;
my_off_t pos_in_file;
+ my_bool append_cache= (info->type == SEQ_READ_APPEND);
DBUG_ENTER("my_b_flush_io_cache");
DBUG_PRINT("enter", ("cache: 0x%lx", (long) info));
- if (!(append_cache = (info->type == SEQ_READ_APPEND)))
- need_append_buffer_lock=0;
+#ifdef THREAD
+ if (!append_cache)
+ need_append_buffer_lock= 0;
+#endif
if (info->type == WRITE_CACHE || append_cache)
{