~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_mysql.cc

  • Committer: Monty Taylor
  • Date: 2010-10-05 16:22:51 UTC
  • mfrom: (1802.7.4 build)
  • Revision ID: mordred@inaugust.com-20101005162251-h1uk27p0k1bly0fm
Merge Andrew - fix bug 651950 - Table comments

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
  if (verbose)
42
42
    std::cerr << _("-- Retrieving table structures for ") << databaseName << "..." << std::endl;
43
43
 
44
 
  query="SELECT TABLE_NAME, TABLE_COLLATION, ENGINE, AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE != 'VIEW' AND TABLE_SCHEMA='";
 
44
  query="SELECT TABLE_NAME, TABLE_COLLATION, ENGINE, AUTO_INCREMENT, TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE != 'VIEW' AND TABLE_SCHEMA='";
45
45
  query.append(databaseName);
46
46
  query.append("' ORDER BY TABLE_NAME");
47
47
 
52
52
 
53
53
  while ((row= drizzle_row_next(result)))
54
54
  {
 
55
    size_t* row_sizes= drizzle_row_field_sizes(result);
55
56
    std::string tableName(row[0]);
56
57
    std::string displayName(tableName);
57
58
    cleanTableName(displayName);
67
68
    else
68
69
      table->autoIncrement= 0;
69
70
 
 
71
    if (row[4])
 
72
      table->comment= DrizzleDumpData::escape(row[4], row_sizes[4]);
 
73
    else
 
74
      table->comment= "";
 
75
 
70
76
    table->database= this;
71
77
    if ((not table->populateFields()) or (not table->populateIndexes()))
72
78
    {