diff options
author | sasha@mysql.sashanet.com <> | 2001-07-20 16:22:54 -0600 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2001-07-20 16:22:54 -0600 |
commit | 008456c9b6c80d8a12a62ef46bfc30cd3e970f5e (patch) | |
tree | 6cd61ea930bb9d0f0aeb1d1fd005e1e7c25f0228 /mysys/mf_iocache.c | |
parent | b5f76be02425f62411b48bf12a1ea470ea193203 (diff) | |
download | mariadb-git-008456c9b6c80d8a12a62ef46bfc30cd3e970f5e.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
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r-- | mysys/mf_iocache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 0d1c227c2b2..99af418f6bd 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -56,6 +56,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize, DBUG_PRINT("enter",("type: %d pos: %ld",(int) type, (ulong) seek_offset)); 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 */ @@ -467,8 +468,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; } |