~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/int64_t.cc

  • Committer: Brian Aker
  • Date: 2008-08-07 16:29:49 UTC
  • mfrom: (264.1.20 codestyle)
  • Revision ID: brian@tangent.org-20080807162949-7o8eyjgdn8ms3n1a
Merge from Monty.

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 <drizzled/server_includes.h>
25
26
#include <drizzled/field/int64_t.h>
26
27
 
27
28
/****************************************************************************
28
29
 Field type int64_t int (8 bytes)
29
30
****************************************************************************/
30
31
 
31
 
int Field_int64_t::store(const char *from,uint len,CHARSET_INFO *cs)
 
32
int Field_int64_t::store(const char *from,uint len, const CHARSET_INFO * const cs)
32
33
{
33
34
  int error= 0;
34
35
  char *end;
175
176
String *Field_int64_t::val_str(String *val_buffer,
176
177
                                String *val_ptr __attribute__((unused)))
177
178
{
178
 
  CHARSET_INFO *cs= &my_charset_bin;
 
179
  const CHARSET_INFO * const cs= &my_charset_bin;
179
180
  uint length;
180
181
  uint mlength=max(field_length+1,22*cs->mbmaxlen);
181
182
  val_buffer->alloc(mlength);
260
261
 
261
262
void Field_int64_t::sql_type(String &res) const
262
263
{
263
 
  CHARSET_INFO *cs=res.charset();
 
264
  const CHARSET_INFO * const cs=res.charset();
264
265
  res.length(cs->cset->snprintf(cs,(char*) res.ptr(),res.alloced_length(), "bigint"));
265
266
  add_unsigned(res);
266
267
}