~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/blackhole/ha_blackhole.cc

  • Committer: Brian Aker
  • Date: 2011-01-17 04:15:23 UTC
  • mto: (2088.1.3 merge)
  • mto: This revision was merged to the branch mainline in revision 2089.
  • Revision ID: brian@gir-3-20110117041523-o9ex94kfz1a6iqyw
Modify TableIdentifier to fit with the rest of the identifiers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
  int doCreateTable(Session&,
81
81
                    Table&,
82
 
                    const drizzled::TableIdentifier &identifier,
 
82
                    const drizzled::identifier::Table &identifier,
83
83
                    drizzled::message::Table&);
84
84
 
85
 
  int doDropTable(Session&, const drizzled::TableIdentifier &identifier);
 
85
  int doDropTable(Session&, const drizzled::identifier::Table &identifier);
86
86
 
87
87
  BlackholeShare *findOpenTable(const string table_name);
88
88
  void addOpenTable(const string &table_name, BlackholeShare *);
89
89
  void deleteOpenTable(const string &table_name);
90
90
 
91
91
  int doGetTableDefinition(Session& session,
92
 
                           const drizzled::TableIdentifier &identifier,
 
92
                           const drizzled::identifier::Table &identifier,
93
93
                           drizzled::message::Table &table_message);
94
94
 
95
95
  /* The following defines can be increased if necessary */
106
106
            HA_KEYREAD_ONLY);
107
107
  }
108
108
 
109
 
  bool doDoesTableExist(Session& session, const drizzled::TableIdentifier &identifier);
110
 
  int doRenameTable(Session&, const drizzled::TableIdentifier &from, const drizzled::TableIdentifier &to);
 
109
  bool doDoesTableExist(Session& session, const drizzled::identifier::Table &identifier);
 
110
  int doRenameTable(Session&, const drizzled::identifier::Table &from, const drizzled::identifier::Table &to);
111
111
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
112
112
                             const drizzled::identifier::Schema &schema_identifier,
113
 
                             drizzled::TableIdentifier::vector &set_of_identifiers);
 
113
                             drizzled::identifier::Table::vector &set_of_identifiers);
114
114
};
115
115
 
116
116
 
117
117
void BlackholeEngine::doGetTableIdentifiers(drizzled::CachedDirectory &directory,
118
118
                                            const drizzled::identifier::Schema &schema_identifier,
119
 
                                            drizzled::TableIdentifier::vector &set_of_identifiers)
 
119
                                            drizzled::identifier::Table::vector &set_of_identifiers)
120
120
{
121
121
  drizzled::CachedDirectory::Entries entries= directory.getEntries();
122
122
 
138
138
      char uname[NAME_LEN + 1];
139
139
      uint32_t file_name_len;
140
140
 
141
 
      file_name_len= TableIdentifier::filename_to_tablename(filename->c_str(), uname, sizeof(uname));
 
141
      file_name_len= identifier::Table::filename_to_tablename(filename->c_str(), uname, sizeof(uname));
142
142
      // TODO: Remove need for memory copy here
143
143
      uname[file_name_len - sizeof(BLACKHOLE_EXT) + 1]= '\0'; // Subtract ending, place NULL
144
144
 
145
 
      set_of_identifiers.push_back(TableIdentifier(schema_identifier, uname));
 
145
      set_of_identifiers.push_back(identifier::Table(schema_identifier, uname));
146
146
    }
147
147
  }
148
148
}
149
149
 
150
 
int BlackholeEngine::doRenameTable(Session&, const drizzled::TableIdentifier &from, const drizzled::TableIdentifier &to)
 
150
int BlackholeEngine::doRenameTable(Session&, const drizzled::identifier::Table &from, const drizzled::identifier::Table &to)
151
151
{
152
152
  int error= 0;
153
153
 
212
212
 
213
213
int BlackholeEngine::doCreateTable(Session&,
214
214
                                   Table&,
215
 
                                   const drizzled::TableIdentifier &identifier,
 
215
                                   const drizzled::identifier::Table &identifier,
216
216
                                   drizzled::message::Table& proto)
217
217
{
218
218
  string serialized_proto;
238
238
 
239
239
 
240
240
int BlackholeEngine::doDropTable(Session&,
241
 
                                 const drizzled::TableIdentifier &identifier)
 
241
                                 const drizzled::identifier::Table &identifier)
242
242
{
243
243
  string new_path(identifier.getPath());
244
244
 
256
256
 
257
257
 
258
258
bool BlackholeEngine::doDoesTableExist(Session&,
259
 
                                       const drizzled::TableIdentifier &identifier)
 
259
                                       const drizzled::identifier::Table &identifier)
260
260
{
261
261
  string proto_path(identifier.getPath());
262
262
  proto_path.append(BLACKHOLE_EXT);
271
271
 
272
272
 
273
273
int BlackholeEngine::doGetTableDefinition(Session&,
274
 
                                          const drizzled::TableIdentifier &identifier,
 
274
                                          const drizzled::identifier::Table &identifier,
275
275
                                          drizzled::message::Table &table_proto)
276
276
{
277
277
  string new_path;