~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/uuid.cc

  • Committer: Brian Aker
  • Date: 2010-12-26 01:00:32 UTC
  • Revision ID: brian@tangent.org-20101226010032-o1p4ob1i9fz4x7oc
Update for linted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
int Uuid::store(const char *from, uint32_t length, const CHARSET_INFO * const )
61
61
{
62
62
  ASSERT_COLUMN_MARKED_FOR_WRITE;
63
 
  uuid_st uu;
 
63
  type::Uuid uu;
64
64
 
65
65
  if (is_set)
66
66
  {
68
68
    return 0;
69
69
  }
70
70
 
71
 
  if (length != uuid_st::DISPLAY_LENGTH)
 
71
  if (length != type::Uuid::DISPLAY_LENGTH)
72
72
  {
73
73
    my_error(ER_INVALID_UUID_VALUE, MYF(ME_FATALERROR));
74
74
    return 1;
137
137
String *Uuid::val_str(String *val_buffer, String *)
138
138
{
139
139
  const CHARSET_INFO * const cs= &my_charset_bin;
140
 
  uint32_t mlength= (uuid_st::DISPLAY_BUFFER_LENGTH) * cs->mbmaxlen;
141
 
  uuid_st uu;
 
140
  uint32_t mlength= (type::Uuid::DISPLAY_BUFFER_LENGTH) * cs->mbmaxlen;
 
141
  type::Uuid uu;
142
142
 
143
143
  val_buffer->alloc(mlength);
144
144
  char *buffer=(char*) val_buffer->ptr();
148
148
  uu.unpack(ptr);
149
149
  uu.unparse(buffer);
150
150
 
151
 
  val_buffer->length(uuid_st::DISPLAY_LENGTH);
 
151
  val_buffer->length(type::Uuid::DISPLAY_LENGTH);
152
152
 
153
153
  return val_buffer;
154
154
}
155
155
 
156
156
void Uuid::sort_string(unsigned char *to, uint32_t length_arg)
157
157
{
158
 
  assert(length_arg == uuid_st::LENGTH);
 
158
  assert(length_arg == type::Uuid::LENGTH);
159
159
  memcpy(to, ptr, length_arg);
160
160
}
161
161
 
162
162
bool Uuid::get_date(type::Time *ltime, uint32_t )
163
163
{
164
 
  uuid_st uu;
 
164
  type::Uuid uu;
165
165
 
166
166
  uu.unpack(ptr);
167
167