~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/varstring.cc

  • Committer: Stewart Smith
  • Date: 2008-08-02 07:12:36 UTC
  • mfrom: (258 drizzle)
  • mto: This revision was merged to the branch mainline in revision 408.
  • Revision ID: stewart@flamingspork.com-20080802071236-kbcozl5zm23j6mkn
merge from mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#pragma implementation                          // gcc: Class implementation
23
23
#endif
24
24
 
25
 
#include "drizzle/server/field/varstring.h"
 
25
#include <drizzled/field/varstring.h>
26
26
 
27
27
/****************************************************************************
28
28
  VARCHAR type
336
336
*/
337
337
 
338
338
const uchar *
339
 
Field_varstring::unpack_key(uchar *to __attribute__((__unused__)),
 
339
Field_varstring::unpack_key(uchar *to __attribute__((unused)),
340
340
                            const uchar *key, uint max_length,
341
341
                            bool low_byte_first __attribute__((unused)))
342
342
{
492
492
 
493
493
uint Field_varstring::get_key_image(uchar *buff,
494
494
                                    uint length,
495
 
                                    imagetype type __attribute__((__unused__)))
 
495
                                    imagetype type __attribute__((unused)))
496
496
{
497
497
  uint f_length=  length_bytes == 1 ? (uint) *ptr : uint2korr(ptr);
498
498
  uint local_char_length= length / field_charset->mbmaxlen;
509
509
      Must clear this as we do a memcmp in opt_range.cc to detect
510
510
      identical keys
511
511
    */
512
 
    bzero(buff+HA_KEY_BLOB_LENGTH+f_length, (length-f_length));
 
512
    memset(buff+HA_KEY_BLOB_LENGTH+f_length, 0, (length-f_length));
513
513
  }
514
514
  return HA_KEY_BLOB_LENGTH+f_length;
515
515
}