summaryrefslogtreecommitdiff
path: root/isam
diff options
context:
space:
mode:
authormonty@bitch.mysql.fi <>2001-11-28 02:55:52 +0200
committermonty@bitch.mysql.fi <>2001-11-28 02:55:52 +0200
commitd0ccff50907e7b04f0d14ad95f359dc23e6dc294 (patch)
tree40e5d73c964ca6aeb5e0e7d4294e70216edaa397 /isam
parentd3288575de18b38179961a8acf93ba883a90e652 (diff)
downloadmariadb-git-d0ccff50907e7b04f0d14ad95f359dc23e6dc294.tar.gz
New improved IO_CACHE
Diffstat (limited to 'isam')
-rw-r--r--isam/_cache.c14
-rw-r--r--isam/_statrec.c2
-rw-r--r--isam/test3.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/isam/_cache.c b/isam/_cache.c
index 53619126660..9383c04dfbc 100644
--- a/isam/_cache.c
+++ b/isam/_cache.c
@@ -46,11 +46,11 @@ int _nisam_read_cache(IO_CACHE *info, byte *buff, ulong pos, uint length,
buff+=read_length;
}
if ((offset=pos - (ulong) info->pos_in_file) <
- (ulong) (info->rc_end - info->rc_request_pos))
+ (ulong) (info->read_end - info->request_pos))
{
- in_buff_pos=info->rc_request_pos+(uint) offset;
- in_buff_length= min(length,(uint) (info->rc_end-in_buff_pos));
- memcpy(buff,info->rc_request_pos+(uint) offset,(size_t) in_buff_length);
+ in_buff_pos=info->request_pos+(uint) offset;
+ in_buff_length= min(length,(uint) (info->read_end-in_buff_pos));
+ memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length);
if (!(length-=in_buff_length))
return 0;
pos+=in_buff_length;
@@ -61,14 +61,14 @@ int _nisam_read_cache(IO_CACHE *info, byte *buff, ulong pos, uint length,
if (flag & READING_NEXT)
{
if (pos != ((info)->pos_in_file +
- (uint) ((info)->rc_end - (info)->rc_request_pos)))
+ (uint) ((info)->read_end - (info)->request_pos)))
{
info->pos_in_file=pos; /* Force start here */
- info->rc_pos=info->rc_end=info->rc_request_pos; /* Everything used */
+ info->read_pos=info->read_end=info->request_pos; /* Everything used */
info->seek_not_done=1;
}
else
- info->rc_pos=info->rc_end; /* All block used */
+ info->read_pos=info->read_end; /* All block used */
if (!(*info->read_function)(info,buff,length))
return 0;
if (!(flag & READING_HEADER) || info->error == -1 ||
diff --git a/isam/_statrec.c b/isam/_statrec.c
index d93f4fe27f5..87793907da8 100644
--- a/isam/_statrec.c
+++ b/isam/_statrec.c
@@ -187,7 +187,7 @@ int _nisam_read_rnd_static_record(N_INFO *info, byte *buf,
(skipp_deleted_blocks || !filepos))
{
cache_read=1; /* Read record using cache */
- cache_length=(uint) (info->rec_cache.rc_end - info->rec_cache.rc_pos);
+ cache_length=(uint) (info->rec_cache.read_end - info->rec_cache.read_pos);
}
else
info->rec_cache.seek_not_done=1; /* Filepos is changed */
diff --git a/isam/test3.c b/isam/test3.c
index 935c194106d..95e1a2a68cd 100644
--- a/isam/test3.c
+++ b/isam/test3.c
@@ -172,7 +172,7 @@ void start_test(int id)
}
if (key_cacheing && rnd(2) == 0)
init_key_cache(65536L,(uint) IO_SIZE*4*10);
- printf("Process %d, pid: %d\n",id,getpid()); fflush(stdout);
+ printf("Process %d, pid: %d\n",id,(int) getpid()); fflush(stdout);
for (error=i=0 ; i < tests && !error; i++)
{
@@ -356,7 +356,7 @@ int test_write(N_INFO *file,int id,int lock_type)
nisam_extra(file,HA_EXTRA_WRITE_CACHE);
}
- sprintf(record.id,"%7d",getpid());
+ sprintf(record.id,"%7d",(int) getpid());
strmov(record.text,"Testing...");
tries=(uint) rnd(100)+10;