~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/create_field.cc

  • Committer: Brian Aker
  • Date: 2010-10-21 08:55:44 UTC
  • mto: (1866.1.1 merge)
  • mto: This revision was merged to the branch mainline in revision 1867.
  • Revision ID: brian@tangent.org-20101021085544-chpce06zm4tdaqdi
This creates a function for seeing which catalog you are in. It also
refactors some of the functions to be in the utility_function collect.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include "drizzled/field/decimal.h"
38
38
#include "drizzled/field/real.h"
39
39
#include "drizzled/field/double.h"
40
 
#include "drizzled/field/int32.h"
41
 
#include "drizzled/field/int64.h"
 
40
#include "drizzled/field/long.h"
 
41
#include "drizzled/field/int64_t.h"
42
42
#include "drizzled/field/num.h"
43
43
#include "drizzled/field/timestamp.h"
44
44
#include "drizzled/field/datetime.h"
45
45
#include "drizzled/field/varstring.h"
46
 
#include "drizzled/field/uuid.h"
47
46
#include "drizzled/temporal.h"
48
 
#include "drizzled/item/string.h"
49
47
 
50
48
#include <algorithm>
51
49
 
112
110
    {
113
111
      char buff[MAX_FIELD_WIDTH], *pos;
114
112
      String tmp(buff, sizeof(buff), charset), *res;
115
 
      res= orig_field->val_str_internal(&tmp);
 
113
      res= orig_field->val_str(&tmp);
116
114
      pos= (char*) memory::sql_strmake(res->ptr(), res->length());
117
115
      def= new Item_string(pos, res->length(), charset);
118
116
    }
351
349
    case DRIZZLE_TYPE_DATE:
352
350
      length= Date::MAX_STRING_LENGTH;
353
351
      break;
354
 
    case DRIZZLE_TYPE_UUID:
355
 
      length= field::Uuid::max_string_length();
356
 
      break;
357
352
    case DRIZZLE_TYPE_DATETIME:
358
353
      length= DateTime::MAX_STRING_LENGTH;
359
354
      break;