~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_mysql.cc

  • Committer: Andrew Hutchings
  • Date: 2010-12-06 12:15:06 UTC
  • mto: This revision was merged to the branch mainline in revision 1981.
  • Revision ID: andrew@linuxjedi.co.uk-20101206121506-4870yam6809gewnz
Add field level comments back in to drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
  if (verbose)
168
168
    std::cerr << _("-- Retrieving fields for ") << tableName << "..." << std::endl;
169
169
 
170
 
  query="SELECT COLUMN_NAME, COLUMN_TYPE, COLUMN_DEFAULT, IS_NULLABLE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME, EXTRA FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='";
 
170
  query="SELECT COLUMN_NAME, COLUMN_TYPE, COLUMN_DEFAULT, IS_NULLABLE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE, COLLATION_NAME, EXTRA, COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='";
171
171
  query.append(database->databaseName);
172
172
  query.append("' AND TABLE_NAME='");
173
173
  query.append(tableName);
206
206
    field->length= (row[4]) ? boost::lexical_cast<uint32_t>(row[4]) : 0;
207
207
    field->decimalPrecision= (row[5] != NULL) ? boost::lexical_cast<uint32_t>(row[5]) : 0;
208
208
    field->decimalScale= (row[6] != NULL) ? boost::lexical_cast<uint32_t>(row[6]) : 0;
209
 
 
 
209
    field->comment= (row[9]) ? row[9] : "";
210
210
    fields.push_back(field);
211
211
  }
212
212