~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.cc

  • Committer: Monty Taylor
  • Date: 2008-09-22 23:53:43 UTC
  • mto: This revision was merged to the branch mainline in revision 417.
  • Revision ID: monty@inaugust.com-20080922235343-ihqvp6g9k1mtzxmc
Renamed max/min.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
uint32_t
29
29
blob_pack_length_to_max_length(uint arg)
30
30
{
31
 
  return (1LL << min(arg, 4U) * 8) - 1LL;
 
31
  return (1LL << cmin(arg, 4U) * 8) - 1LL;
32
32
}
33
33
 
34
34
 
183
183
    from= tmpstr.ptr();
184
184
  }
185
185
 
186
 
  new_length= min(max_data_length(), field_charset->mbmaxlen * length);
 
186
  new_length= cmin(max_data_length(), field_charset->mbmaxlen * length);
187
187
  if (value.alloc(new_length))
188
188
    goto oom_error;
189
189
 
339
339
  b_length=get_length(b_ptr);
340
340
  if (b_length > max_length)
341
341
    b_length=max_length;
342
 
  diff=memcmp(a,b,min(a_length,b_length));
 
342
  diff=memcmp(a,b,cmin(a_length,b_length));
343
343
  return diff ? diff : (int) (a_length - b_length);
344
344
}
345
345
 
491
491
    length given is smaller than the actual length of the blob, we
492
492
    just store the initial bytes of the blob.
493
493
  */
494
 
  store_length(to, packlength, min(length, max_length), low_byte_first);
 
494
  store_length(to, packlength, cmin(length, max_length), low_byte_first);
495
495
 
496
496
  /*
497
497
    Store the actual blob data, which will occupy 'length' bytes.