~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/enum.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-20 15:04:56 UTC
  • mto: This revision was merged to the branch mainline in revision 2345.
  • Revision ID: olafvdspek@gmail.com-20110620150456-sxjqkvqg3p725y8z
RemoveĀ unusedĀ Field::sql_type()

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
  }
179
179
}
180
180
 
181
 
void Field_enum::sql_type(String &res) const
182
 
{
183
 
  char buffer[255];
184
 
  String enum_item(buffer, sizeof(buffer), res.charset());
185
 
 
186
 
  res.length(0);
187
 
  res.append(STRING_WITH_LEN("enum("));
188
 
 
189
 
  bool flag=0;
190
 
  uint32_t *len= typelib->type_lengths;
191
 
  for (const char **pos= typelib->type_names; *pos; pos++, len++)
192
 
  {
193
 
    if (flag)
194
 
      res.append(',');
195
 
    /* convert to res.charset() == utf8, then quote */
196
 
    enum_item.copy(*pos, *len, res.charset());
197
 
    append_unescaped(&res, enum_item.c_ptr(), enum_item.length());
198
 
    flag= 1;
199
 
  }
200
 
  res.append(')');
201
 
}
202
 
 
203
181
Field *Field_enum::new_field(memory::Root *root, Table *new_table,
204
182
                             bool keep_type)
205
183
{