summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-05-16 08:48:52 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-02 18:53:36 +0200
commit80e61ae21e2373ee73407f91f596b11c2c46e7d9 (patch)
tree6478f01d7bc067fb7c526056b1544b3567753993 /mysys/mf_iocache.c
parent91dab5ddb6accbb256e7089aea8ba38e66a1b0cf (diff)
downloadmariadb-git-80e61ae21e2373ee73407f91f596b11c2c46e7d9.tar.gz
cleanup: LOAD DATA replication support in IO_CACHE
remove some 14-year old code that added support for LOAD DATA replication to IO_CACHE: * three callbacks, of which only two were actually used and that were only needed for LOAD DATA replication but were tested in every IO_CACHE instance * an additional opaque void * argument in IO_CACHE, also only used for LOAD DATA replication, but present everywhere * the code to close IO_CACHE prematurely in LOAD DATA to have these callbacks called in the correct order and a long comment explaining what will happen if IO_CACHE is not closed prematurely * a variable to track whether IO_CACHE was closed prematurely (to avoid double-closing it)
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r--mysys/mf_iocache.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index a3cbaff68b0..354995c644d 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -1,5 +1,6 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates
+ Copyright (c) 2010, 2015, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -157,8 +158,6 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
info->file= file;
info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */
info->pos_in_file= seek_offset;
- info->pre_close = info->pre_read = info->post_read = 0;
- info->arg = 0;
info->alloced_buffer = 0;
info->buffer=0;
info->seek_not_done= 0;
@@ -1500,13 +1499,8 @@ int _my_b_async_read(register IO_CACHE *info, uchar *Buffer, size_t Count)
int _my_b_get(IO_CACHE *info)
{
uchar buff;
- IO_CACHE_CALLBACK pre_read,post_read;
- if ((pre_read = info->pre_read))
- (*pre_read)(info);
if ((*(info)->read_function)(info,&buff,1))
return my_b_EOF;
- if ((post_read = info->post_read))
- (*post_read)(info);
return (int) (uchar) buff;
}
@@ -1821,7 +1815,6 @@ int my_b_flush_io_cache(IO_CACHE *info,
int end_io_cache(IO_CACHE *info)
{
int error=0;
- IO_CACHE_CALLBACK pre_close;
DBUG_ENTER("end_io_cache");
DBUG_PRINT("enter",("cache: 0x%lx", (ulong) info));
@@ -1831,11 +1824,6 @@ int end_io_cache(IO_CACHE *info)
*/
DBUG_ASSERT(!info->share || !info->share->total_threads);
- if ((pre_close=info->pre_close))
- {
- (*pre_close)(info);
- info->pre_close= 0;
- }
if (info->alloced_buffer)
{
info->alloced_buffer=0;