summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache2.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-11-28 16:11:05 +0200
committerunknown <monty@hundin.mysql.fi>2001-11-28 16:11:05 +0200
commitcaa13ea3e7abd946915e5526680edab46d9f460f (patch)
treedd1ee5dcda0fecccd46e084224858ae5668594c7 /mysys/mf_iocache2.c
parentb631ea0188d5fb4768732eccb4c5024276b34c9b (diff)
downloadmariadb-git-caa13ea3e7abd946915e5526680edab46d9f460f.tar.gz
Fix of testcases after merge.
Small improvement to write caching. Docs/manual.texi: Updated Changelog mysql-test/r/rpl000013.result: Fix after merge mysql-test/r/rpl000016.result: Fix after merge mysys/mf_iocache2.c: Small improvement to write caching. sql/sql_select.cc: Removed warning
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r--mysys/mf_iocache2.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index 59ad3675f5f..a2f10ca3b9f 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -60,16 +60,20 @@ void my_b_seek(IO_CACHE *info,my_off_t pos)
DBUG_VOID_RETURN;
}
flush_io_cache(info);
+ /* Correct buffer end so that we write in increments of IO_SIZE */
+ info->write_end=(info->write_buffer+info->buffer_length-
+ (pos & (IO_SIZE-1)));
}
info->pos_in_file=pos;
info->seek_not_done=1;
}
+
/*
-** Fill buffer. Note that this assumes that you have already used
-** all characters in the CACHE, independent of the read_pos value!
-** return: 0 on error or EOF (info->error = -1 on error)
-** number of characters
+ Fill buffer. Note that this assumes that you have already used
+ all characters in the CACHE, independent of the read_pos value!
+ return: 0 on error or EOF (info->error = -1 on error)
+ number of characters
*/
uint my_b_fill(IO_CACHE *info)
@@ -109,11 +113,12 @@ uint my_b_fill(IO_CACHE *info)
return length;
}
+
/*
-** Read a string ended by '\n' into a buffer of 'max_length' size.
-** Returns number of characters read, 0 on error.
-** last byte is set to '\0'
-** If buffer is full then to[max_length-1] will be set to \0.
+ Read a string ended by '\n' into a buffer of 'max_length' size.
+ Returns number of characters read, 0 on error.
+ last byte is set to '\0'
+ If buffer is full then to[max_length-1] will be set to \0.
*/
uint my_b_gets(IO_CACHE *info, char *to, uint max_length)
@@ -151,6 +156,7 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length)
}
}
+
/*
Simple printf version. Supports '%s', '%d', '%u', "%ld" and "%lu"
Used for logging in MySQL