~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
 
22
 
#include <config.h>
 
22
#include "config.h"
23
23
#include <drizzled/field/blob.h>
24
24
#include <drizzled/table.h>
25
25
#include <drizzled/session.h>
26
 
#include <plugin/myisam/myisam.h>
 
26
#include "plugin/myisam/myisam.h"
27
27
 
28
28
#include <string>
29
29
#include <algorithm>
90
90
 
91
91
 
92
92
uint32_t Field_blob::get_length(const unsigned char *pos,
93
 
                                bool low_byte_first) const
 
93
                                bool low_byte_first)
94
94
{
95
95
#ifndef WORDS_BIGENDIAN
96
96
  (void)low_byte_first;
113
113
}
114
114
 
115
115
 
116
 
uint32_t Field_blob::get_length(uint32_t row_offset) const
 
116
uint32_t Field_blob::get_length(uint32_t row_offset)
117
117
{
118
118
  return get_length(ptr+row_offset,
119
119
                    getTable()->getShare()->db_low_byte_first);
120
120
}
121
121
 
122
122
 
123
 
uint32_t Field_blob::get_length(const unsigned char *ptr_arg) const
 
123
uint32_t Field_blob::get_length(const unsigned char *ptr_arg)
124
124
{
125
125
  return get_length(ptr_arg, getTable()->getShare()->db_low_byte_first);
126
126
}
224
224
}
225
225
 
226
226
 
227
 
double Field_blob::val_real(void) const
 
227
double Field_blob::val_real(void)
228
228
{
229
229
  int not_used;
230
230
  char *end_not_used, *blob;
242
242
}
243
243
 
244
244
 
245
 
int64_t Field_blob::val_int(void) const
 
245
int64_t Field_blob::val_int(void)
246
246
{
247
247
  int not_used;
248
248
  char *blob;
252
252
  memcpy(&blob,ptr+sizeof(uint32_t),sizeof(char*));
253
253
  if (!blob)
254
254
    return 0;
255
 
  uint32_t length= get_length(ptr);
 
255
  uint32_t length=get_length(ptr);
256
256
  return my_strntoll(charset(),blob,length,10,NULL,&not_used);
257
257
}
258
258
 
259
 
String *Field_blob::val_str(String *, String *val_ptr) const
 
259
String *Field_blob::val_str(String *,
 
260
                            String *val_ptr)
260
261
{
261
262
  char *blob;
262
263
 
271
272
}
272
273
 
273
274
 
274
 
type::Decimal *Field_blob::val_decimal(type::Decimal *decimal_value) const
 
275
type::Decimal *Field_blob::val_decimal(type::Decimal *decimal_value)
275
276
{
276
277
  const char *blob;
277
278
  size_t length;