summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2003-01-26 14:20:43 +0100
committerunknown <serg@serg.mysql.com>2003-01-26 14:20:43 +0100
commit2621b0b97c6feb3176ffd2bcc65e33ded0d7917e (patch)
tree3853594e45a9491823f722bcee12a4abba346832 /myisam
parent7fe48f6949fdc316b528fecf8b5edcaedb121241 (diff)
downloadmariadb-git-2621b0b97c6feb3176ffd2bcc65e33ded0d7917e.tar.gz
enadling out-of-cache reads for shared IO_CACHE
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_cache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/myisam/mi_cache.c b/myisam/mi_cache.c
index 462e48b3532..8dee068c50e 100644
--- a/myisam/mi_cache.c
+++ b/myisam/mi_cache.c
@@ -29,7 +29,8 @@
Allows "partial read" errors in the record header (when READING_HEADER flag
is set) - unread part is bzero'ed
- Note: out-of-cache reads are disabled for shared IO_CACHE's
+ Note: out-of-cache reads are enabled for shared IO_CACHE's too,
+ as these reads will be cached by OS cache (and my_pread is always atomic)
*/
@@ -43,7 +44,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
char *in_buff_pos;
DBUG_ENTER("_mi_read_cache");
- if (pos < info->pos_in_file && ! info->share)
+ if (pos < info->pos_in_file)
{
read_length=length;
if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos))
@@ -70,7 +71,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
}
else
in_buff_length=0;
- if (flag & READING_NEXT || info->share)
+ if (flag & READING_NEXT)
{
if (pos != (info->pos_in_file +
(uint) (info->read_end - info->request_pos)))