~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_data.cc

Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
extern int opt_destination;
58
58
 
59
 
/* returns true on keep, false on ignore */
 
59
// returns true on keep, false on ignore Olaf: sounds backwards/wrong, shouldn't it be the other way around?
60
60
bool DrizzleDumpDatabase::ignoreTable(std::string tableName)
61
61
{
62
 
  std::string dbTable(databaseName);
63
 
  dbTable.append(".");
64
 
  dbTable.append(tableName);
65
 
 
66
 
  boost::unordered_set<std::string>::iterator iter= ignore_table.find(dbTable);
67
 
  return (iter == ignore_table.end());
 
62
  return ignore_table.find(databaseName + "." + tableName) == ignore_table.end();
68
63
}
69
64
 
70
65
void DrizzleDumpDatabase::cleanTableName(std::string &tableName)
112
107
 
113
108
  os << "(";
114
109
  
115
 
  std::vector<std::string>::iterator i;
116
 
  std::vector<std::string> fields = obj.columns;
 
110
  std::vector<DrizzleDumpIndex::columnData>::iterator i;
 
111
  std::vector<DrizzleDumpIndex::columnData> fields = obj.columns;
117
112
  for (i= fields.begin(); i != fields.end(); ++i)
118
113
  {
119
114
    if (i != fields.begin())
120
115
      os << ",";
121
 
    std::string field= *i;
122
 
    os << "`" << field << "`";
123
 
    if (obj.length > 0)
124
 
      os << "(" << obj.length << ")";
 
116
    os << "`" << (*i).first << "`";
 
117
    if ((*i).second > 0)
 
118
      os << "(" << (*i).second << ")";
125
119
  }
126
120
 
127
121
  os << ")";
533
527
    os << " COMMENT='" << obj.comment << "'";
534
528
  }
535
529
 
 
530
  if (not obj.replicate)
 
531
  {
 
532
    os << " REPLICATE=FALSE";
 
533
  }
 
534
 
536
535
  os << ";" << std::endl << std::endl;
537
536
 
538
537
  return os;