~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_mysql.cc

  • Committer: Andrew Hutchings
  • Date: 2010-10-27 14:21:10 UTC
  • mto: (1888.1.2 merge)
  • mto: This revision was merged to the branch mainline in revision 1889.
  • Revision ID: andrew@linuxjedi.co.uk-20101027142110-3pltrwovm6fgxyhn
MySQL can contain '' as an ENUM value which is not valid in Drizzle.  Convert this to NULL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
    field->convertDateTime= false;
187
187
    /* Also sets collation */
188
188
    field->setType(row[1], row[8]);
189
 
    field->isNull= (strcmp(row[3], "YES") == 0) ? true : false;
 
189
    if (field->type.compare("ENUM") == 0)
 
190
      field->isNull= true;
 
191
    else
 
192
      field->isNull= (strcmp(row[3], "YES") == 0) ? true : false;
190
193
    if (row[2])
191
194
    {
192
195
      field->defaultValue= row[2];