summaryrefslogtreecommitdiff
path: root/sql/mf_iocache.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-07-20 16:22:54 -0600
committerunknown <sasha@mysql.sashanet.com>2001-07-20 16:22:54 -0600
commite642692a5d25d7771ecab767be9fb8b369d077da (patch)
tree6cd61ea930bb9d0f0aeb1d1fd005e1e7c25f0228 /sql/mf_iocache.cc
parentbab169b6923870bf2e08a80aa8e22d8851a9a10f (diff)
downloadmariadb-git-e642692a5d25d7771ecab767be9fb8b369d077da.tar.gz
added pre/post read callbacks to IO_CACHE
#ifdefed out code not used in the server from log events started on new LOAD DATA INFILE events include/my_sys.h: added pre/post read callbacks to IO_CACHe mysys/mf_iocache.c: pre/post read callbacks sql/log_event.cc: cleanup to #ifdef out unneeded code in the server started work on new Load data infile events sql/log_event.h: clean-up plus start of new LOAD DATA INFILE events work sql/mf_iocache.cc: pre/post read callbacks sql/sql_class.cc: file_id sql/sql_class.h: file_id
Diffstat (limited to 'sql/mf_iocache.cc')
-rw-r--r--sql/mf_iocache.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/mf_iocache.cc b/sql/mf_iocache.cc
index cddacaa820f..bf2f2c37409 100644
--- a/sql/mf_iocache.cc
+++ b/sql/mf_iocache.cc
@@ -57,6 +57,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
/* There is no file in net_reading */
info->file= file;
+ info->pre_read = info->post_read = 0;
if (!cachesize)
if (! (cachesize= my_default_record_cache_size))
DBUG_RETURN(1); /* No cache requested */
@@ -535,8 +536,13 @@ int _my_b_async_read(register IO_CACHE *info, byte *Buffer, uint Count)
int _my_b_get(IO_CACHE *info)
{
byte 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;
}