summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
authorunknown <jani@ua141d10.elisa.omakaista.fi>2005-03-08 18:12:12 +0200
committerunknown <jani@ua141d10.elisa.omakaista.fi>2005-03-08 18:12:12 +0200
commit0fdd650feca3e0715f1872e4945b565505ea4ba7 (patch)
tree7058aeff17bc264ab5b7e7c7ccb2d247376f0aef /mysys/mf_iocache.c
parent05dfca24c4720bcc334d27a2e88ddfe9dccf14a6 (diff)
downloadmariadb-git-0fdd650feca3e0715f1872e4945b565505ea4ba7.tar.gz
Fixed Bug#8922.
Reverted Jim's patch. client/mysql.cc: Fixed Bug#8922, The deilimeter cannot be reset after it is set as word 'delimiter' include/my_sys.h: Reverted Jim's patch. mysys/mf_iocache.c: Reverted Jim's patch. sql/sql_class.h: Reverted Jim's patch.
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r--mysys/mf_iocache.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 6fa64aa2d47..b86e9daf92d 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -87,7 +87,7 @@ static void my_aiowait(my_aio_result *result);
void setup_io_cache(IO_CACHE* info)
{
/* Ensure that my_b_tell() and my_b_bytes_in_cache works */
- if (info->type == WRITE_CACHE || info->type == APPEND_CACHE)
+ if (info->type == WRITE_CACHE)
{
info->current_pos= &info->write_pos;
info->current_end= &info->write_end;
@@ -247,7 +247,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
}
#endif
- if (type == WRITE_CACHE || type == APPEND_CACHE)
+ if (type == WRITE_CACHE)
info->write_end=
info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1));
else
@@ -318,7 +318,6 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
/* One can't do reinit with the following types */
DBUG_ASSERT(type != READ_NET && info->type != READ_NET &&
type != WRITE_NET && info->type != WRITE_NET &&
- type != APPEND_CACHE && info->type != APPEND_CACHE &&
type != SEQ_READ_APPEND && info->type != SEQ_READ_APPEND);
/* If the whole file is in memory, avoid flushing to disk */
@@ -1124,8 +1123,7 @@ int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
my_off_t pos_in_file;
DBUG_ENTER("my_b_flush_io_cache");
- if (!(append_cache = (info->type == SEQ_READ_APPEND ||
- info->type == APPEND_CACHE)))
+ if (!(append_cache = (info->type == SEQ_READ_APPEND)))
need_append_buffer_lock=0;
if (info->type == WRITE_CACHE || append_cache)
@@ -1172,13 +1170,7 @@ int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
else
{
info->end_of_file+=(info->write_pos-info->append_read_pos);
- /*
- We only need to worry that info->end_of_file is really accurate
- for SEQ_READ_APPEND. For APPEND_CACHE, it is possible that the
- file is non-seekable, like a FIFO.
- */
- DBUG_ASSERT(info->type != SEQ_READ_APPEND ||
- info->end_of_file == my_tell(info->file,MYF(0)));
+ DBUG_ASSERT(info->end_of_file == my_tell(info->file,MYF(0)));
}
info->append_read_pos=info->write_pos=info->write_buffer;