~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_mysql.cc

  • Committer: Brian Aker
  • Date: 2010-11-02 18:37:09 UTC
  • mfrom: (1897.2.5 merge)
  • Revision ID: brian@tangent.org-20101102183709-n4qjmcju1ozku9ki
Merge of Andrew, tdavies

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
    DrizzleDumpFieldMySQL *field = new DrizzleDumpFieldMySQL(fieldName, dcon);
185
185
    /* Stop valgrind warning */
186
186
    field->convertDateTime= false;
 
187
    field->isNull= (strcmp(row[3], "YES") == 0) ? true : false;
187
188
    /* Also sets collation */
188
189
    field->setType(row[1], row[8]);
189
190
    if (field->type.compare("ENUM") == 0)
190
191
      field->isNull= true;
191
 
    else
192
 
      field->isNull= (strcmp(row[3], "YES") == 0) ? true : false;
 
192
 
193
193
    if (row[2])
194
194
    {
195
195
      field->defaultValue= row[2];
 
196
      if (field->convertDateTime)
 
197
      {
 
198
        field->dateTimeConvert();
 
199
      }
196
200
    }
197
201
    else
198
202
     field->defaultValue= "";
199
203
 
200
 
    if (field->convertDateTime)
201
 
    {
202
 
      field->dateTimeConvert();
203
 
    }
204
 
 
205
 
 
206
204
    field->isAutoIncrement= (strcmp(row[8], "auto_increment") == 0) ? true : false;
207
205
    field->defaultIsNull= field->isNull;
208
206
    field->length= (row[4]) ? boost::lexical_cast<uint32_t>(row[4]) : 0;
248
246
    defaultIsNull= true;
249
247
    defaultValue="";
250
248
  }
251
 
  isNull= true;
252
249
}
253
250
 
254
251
 
480
477
    /* Intended to catch TIME/DATE/TIMESTAMP/DATETIME 
481
478
       We may have a default TIME/DATE which needs converting */
482
479
    convertDateTime= true;
 
480
    isNull= true;
483
481
  }
484
482
 
485
483
  if ((old_type.compare("TIME") == 0) or (old_type.compare("YEAR") == 0))