~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_drizzle.cc

  • Committer: Monty Taylor
  • Date: 2011-02-20 10:23:17 UTC
  • mto: This revision was merged to the branch mainline in revision 2190.
  • Revision ID: mordred@inaugust.com-20110220102317-ycs07rugu0xzfe6w
Make boolean return as tinyint through the mysql_protocol, so that php and
python connectors don't break.

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
    else
196
196
      field->defaultValue= "";
197
197
 
198
 
    field->isNull= (strcmp(row[4], "YES") == 0) ? true : false;
199
 
    field->isAutoIncrement= (strcmp(row[9], "YES") == 0) ? true : false;
200
 
    field->defaultIsNull= (strcmp(row[3], "YES") == 0) ? true : false;
 
198
    field->isNull= (boost::lexical_cast<uint32_t>(row[4])) ? true : false;
 
199
    field->isAutoIncrement= (boost::lexical_cast<uint32_t>(row[9])) ? true : false;
 
200
    field->defaultIsNull= (boost::lexical_cast<uint32_t>(row[3])) ? true : false;
201
201
    field->enumValues= (row[10]) ? row[10] : "";
202
202
    field->length= (row[5]) ? boost::lexical_cast<uint32_t>(row[5]) : 0;
203
203
    field->decimalPrecision= (row[6]) ? boost::lexical_cast<uint32_t>(row[6]) : 0;
244
244
        indexes.push_back(index);
245
245
      index = new DrizzleDumpIndexDrizzle(indexName, dcon);
246
246
      index->isPrimary= (strcmp(row[0], "PRIMARY") == 0);
247
 
      index->isUnique= (strcmp(row[3], "YES") == 0);
 
247
      index->isUnique= boost::lexical_cast<uint32_t>(row[3]);
248
248
      index->isHash= 0;
249
249
      index->length= (row[4]) ? boost::lexical_cast<uint32_t>(row[4]) : 0;
250
250
      lastKey= row[0];