~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/varstring.cc

  • Committer: Brian Aker
  • Date: 2009-01-23 06:19:11 UTC
  • mfrom: (779.1.29 devel)
  • mto: (779.3.3 devel)
  • mto: This revision was merged to the branch mainline in revision 811.
  • Revision ID: brian@tangent.org-20090123061911-59es83nxzlyvh5fi
Merge of Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
                     &end_not_used, &not_used);
156
156
}
157
157
 
158
 
String *Field_varstring::val_str(String *val_buffer __attribute__((unused)),
 
158
String *Field_varstring::val_str(String *,
159
159
                                 String *val_ptr)
160
160
{
161
161
  uint32_t length=  length_bytes == 1 ? (uint) *ptr : uint2korr(ptr);
306
306
 
307
307
unsigned char *Field_varstring::pack(unsigned char *to, const unsigned char *from,
308
308
                             uint32_t max_length,
309
 
                             bool low_byte_first __attribute__((unused)))
 
309
                             bool )
310
310
{
311
311
  uint32_t length= length_bytes == 1 ? (uint) *from : uint2korr(from);
312
312
  set_if_smaller(max_length, field_length);
327
327
 
328
328
unsigned char *
329
329
Field_varstring::pack_key(unsigned char *to, const unsigned char *key, uint32_t max_length,
330
 
                          bool low_byte_first __attribute__((unused)))
 
330
                          bool )
331
331
{
332
332
  uint32_t length=  length_bytes == 1 ? (uint) *key : uint2korr(key);
333
333
  uint32_t local_char_length= ((field_charset->mbmaxlen > 1) ?
364
364
*/
365
365
 
366
366
const unsigned char *
367
 
Field_varstring::unpack_key(unsigned char *to __attribute__((unused)),
 
367
Field_varstring::unpack_key(unsigned char *,
368
368
                            const unsigned char *key, uint32_t max_length,
369
 
                            bool low_byte_first __attribute__((unused)))
 
369
                            bool )
370
370
{
371
371
  /* get length of the blob key */
372
372
  uint32_t length= *key++;
395
395
 
396
396
unsigned char *
397
397
Field_varstring::pack_key_from_key_image(unsigned char *to, const unsigned char *from, uint32_t max_length,
398
 
                                         bool low_byte_first __attribute__((unused)))
 
398
                                         bool )
399
399
{
400
400
  /* Key length is always stored as 2 bytes */
401
401
  uint32_t length= uint2korr(from);
428
428
const unsigned char *
429
429
Field_varstring::unpack(unsigned char *to, const unsigned char *from,
430
430
                        uint32_t param_data,
431
 
                        bool low_byte_first __attribute__((unused)))
 
431
                        bool )
432
432
{
433
433
  uint32_t length;
434
434
  uint32_t l_bytes= (param_data && (param_data < field_length)) ?
547
547
 
548
548
uint32_t Field_varstring::get_key_image(unsigned char *buff,
549
549
                                    uint32_t length,
550
 
                                    imagetype type __attribute__((unused)))
 
550
                                    imagetype )
551
551
{
552
552
  uint32_t f_length=  length_bytes == 1 ? (uint) *ptr : uint2korr(ptr);
553
553
  uint32_t local_char_length= length / field_charset->mbmaxlen;