diff options
author | sasha@mysql.sashanet.com <> | 2001-11-10 22:24:12 -0700 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2001-11-10 22:24:12 -0700 |
commit | beaf95b09dd642c72949ae3c4c87398d00e4df5f (patch) | |
tree | 9303005b745dbcfba11b4ee43cd2971c956dc974 /mysys/mf_iocache.c | |
parent | 79806fadff7849d0bc657386f3fefb807dbfcef5 (diff) | |
download | mariadb-git-beaf95b09dd642c72949ae3c4c87398d00e4df5f.tar.gz |
work to enable reading 3.23 logs - not yet finished
moved fail-safe replication routines from sql_repl.cc to repl_failsafe.cc
write start event only in the first log
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r-- | mysys/mf_iocache.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index f9b668ce09f..f29df74b651 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -166,7 +166,8 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize, info->seek_not_done= test(file >= 0 && type != READ_FIFO && type != READ_NET); info->myflags=cache_myflags & ~(MY_NABP | MY_FNABP); - info->rc_request_pos=info->rc_pos=info->buffer; + info->rc_request_pos=info->rc_pos= info->write_pos = info->buffer; + info->write_pos = info->write_end = 0; if (type == SEQ_READ_APPEND) { info->append_read_pos = info->write_pos = info->append_buffer; @@ -308,6 +309,11 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type, { info->append_read_pos = info->write_pos = info->append_buffer; } + if (!info->write_pos) + info->write_pos = info->buffer; + if (!info->write_end) + info->write_end = info->buffer+info->buffer_length- + (seek_offset & (IO_SIZE-1)); info->type=type; info->error=0; init_read_function(info,type); |