~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.cc

  • Committer: Brian Aker
  • Date: 2009-01-25 02:52:05 UTC
  • mfrom: (801.1.4 testable)
  • Revision ID: brian@gir.tangent.org-20090125025205-zlahg6u6z0w95v64
Merge from Myself

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
void Field_blob::store_length(unsigned char *i_ptr,
60
60
                              uint32_t i_packlength,
61
61
                              uint32_t i_number,
62
 
                              bool low_byte_first __attribute__((unused)))
 
62
                              bool low_byte_first)
63
63
{
 
64
#ifndef WORDS_BIGENDIAN
 
65
  (void)low_byte_first;
 
66
#endif
64
67
  switch (i_packlength) {
65
68
  case 1:
66
69
    i_ptr[0]= (unsigned char) i_number;
99
102
 
100
103
 
101
104
uint32_t Field_blob::get_length(const unsigned char *pos,
102
 
                              uint32_t packlength_arg,
103
 
                              bool low_byte_first __attribute__((unused)))
 
105
                                uint32_t packlength_arg,
 
106
                                bool low_byte_first)
104
107
{
 
108
#ifndef WORDS_BIGENDIAN
 
109
  (void)low_byte_first;
 
110
#endif
105
111
  switch (packlength_arg) {
106
112
  case 1:
107
113
    return (uint32_t) pos[0];
301
307
  return my_strntoll(charset(),blob,length,10,NULL,&not_used);
302
308
}
303
309
 
304
 
String *Field_blob::val_str(String *val_buffer __attribute__((unused)),
 
310
String *Field_blob::val_str(String *,
305
311
                            String *val_ptr)
306
312
{
307
313
  char *blob;
590
596
 
591
597
   @return  New pointer into memory based on from + length of the data
592
598
*/
593
 
const unsigned char *Field_blob::unpack(unsigned char *to __attribute__((unused)),
 
599
const unsigned char *Field_blob::unpack(unsigned char *,
594
600
                                const unsigned char *from,
595
601
                                uint32_t param_data,
596
602
                                bool low_byte_first)
653
659
 
654
660
unsigned char *
655
661
Field_blob::pack_key(unsigned char *to, const unsigned char *from, uint32_t max_length,
656
 
                     bool low_byte_first __attribute__((unused)))
 
662
                     bool )
657
663
{
658
664
  unsigned char *save= ptr;
659
665
  ptr= (unsigned char*) from;
698
704
 
699
705
const unsigned char *
700
706
Field_blob::unpack_key(unsigned char *to, const unsigned char *from, uint32_t max_length,
701
 
                       bool low_byte_first __attribute__((unused)))
 
707
                       bool )
702
708
{
703
709
  /* get length of the blob key */
704
710
  uint32_t length= *from++;
723
729
 
724
730
unsigned char *
725
731
Field_blob::pack_key_from_key_image(unsigned char *to, const unsigned char *from, uint32_t max_length,
726
 
                                    bool low_byte_first __attribute__((unused)))
 
732
                                    bool )
727
733
{
728
734
  uint32_t length=uint2korr(from);
729
735
  if (length > max_length)