~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_cache.cc

Merge Nathan

Show diffs side-by-side

added added

removed removed

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