diff options
author | monty@donna.mysql.com <> | 2001-02-15 03:43:14 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2001-02-15 03:43:14 +0200 |
commit | 450d98e3418fc3e267833d3ad13d45b539269fac (patch) | |
tree | 48461790e73014dbea005fbd6ef8d48e83cc6f14 /myisam/mi_cache.c | |
parent | 7de40020d7684af7ec139455ca99ce6480f434e0 (diff) | |
download | mariadb-git-450d98e3418fc3e267833d3ad13d45b539269fac.tar.gz |
Changed --replace to --replace_result in mysqltest
Changed errmsg -> my_errmsg (portability issue)
Fixed that mysqlbinlog writes SET TIMESTAMP before all queries
Fixed comments in default my.cnf files
Diffstat (limited to 'myisam/mi_cache.c')
-rw-r--r-- | myisam/mi_cache.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/myisam/mi_cache.c b/myisam/mi_cache.c index f2f7af8eac3..0e630cae22b 100644 --- a/myisam/mi_cache.c +++ b/myisam/mi_cache.c @@ -18,8 +18,6 @@ /* Used instead of my_b_read() to allow for no-cacheed seeks */ #include "myisamdef.h" -#define READING_NEXT 1 -#define READING_HEADER 2 /* Copy block from cache if it`s in it. If re_read_if_possibly is */ /* set read to cache (if after current file-position) else read to */ @@ -39,8 +37,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) read_length=(uint) (info->pos_in_file-pos); info->seek_not_done=1; - VOID(my_seek(info->file,pos,MY_SEEK_SET,MYF(0))); - if (my_read(info->file,buff,read_length,MYF(MY_NABP))) + if (my_pread(info->file,buff,read_length,pos,MYF(MY_NABP))) DBUG_RETURN(1); if (!(length-=read_length)) DBUG_RETURN(0); @@ -85,8 +82,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, DBUG_RETURN(0); } info->seek_not_done=1; - VOID(my_seek(info->file,pos,MY_SEEK_SET,MYF(0))); - if ((read_length=my_read(info->file,buff,length,MYF(0))) == length) + if ((read_length=my_pread(info->file,buff,length,pos,MYF(0))) == length) DBUG_RETURN(0); if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) |