~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_cache.c

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
#include "myisamdef.h"
37
37
 
38
 
int _mi_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos, uint length,
 
38
int _mi_read_cache(IO_CACHE *info, unsigned char *buff, my_off_t pos, uint32_t length,
39
39
                   int flag)
40
40
{
41
 
  uint read_length,in_buff_length;
 
41
  uint32_t read_length,in_buff_length;
42
42
  my_off_t offset;
43
 
  uchar *in_buff_pos;
 
43
  unsigned char *in_buff_pos;
44
44
 
45
45
  if (pos < info->pos_in_file)
46
46
  {
60
60
      (my_off_t) (info->read_end - info->request_pos))
61
61
  {
62
62
    in_buff_pos=info->request_pos+(uint) offset;
63
 
    in_buff_length= min(length, (size_t) (info->read_end-in_buff_pos));
 
63
    in_buff_length= cmin(length, (size_t) (info->read_end-in_buff_pos));
64
64
    memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length);
65
65
    if (!(length-=in_buff_length))
66
66
      return(0);