~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/csv/ha_tina.cc

  • Committer: Brian Aker
  • Date: 2010-03-19 00:16:13 UTC
  • mfrom: (1358.1.5 build)
  • Revision ID: brian@gaz-20100319001613-00rqrgybz9xxyssp
Merge more cleanup from TableIdentifier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
  /* Temp only engine, so do not return values. */
152
152
  void doGetTableNames(drizzled::CachedDirectory &, string& , set<string>&) { };
153
153
 
154
 
  int doDropTable(Session&, TableIdentifier &identifier, const string &table_path);
 
154
  int doDropTable(Session&, TableIdentifier &identifier);
155
155
  TinaShare *findOpenTable(const string table_name);
156
156
  void addOpenTable(const string &table_name, TinaShare *);
157
157
  void deleteOpenTable(const string &table_name);
182
182
 
183
183
 
184
184
int Tina::doDropTable(Session&,
185
 
                      TableIdentifier &,
186
 
                      const string &table_path)
 
185
                      TableIdentifier &identifier)
187
186
{
188
187
  int error= 0;
189
188
  int enoent_or_zero= ENOENT;                   // Error if no file was deleted
192
191
 
193
192
  for (const char **ext= bas_ext(); *ext ; ext++)
194
193
  {
195
 
    internal::fn_format(buff, table_path.c_str(), "", *ext,
 
194
    internal::fn_format(buff, identifier.getPath(), "", *ext,
196
195
              MY_UNPACK_FILENAME|MY_APPEND_EXT);
197
196
    if (internal::my_delete_with_symlink(buff, MYF(0)))
198
197
    {
205
204
  }
206
205
 
207
206
  pthread_mutex_lock(&proto_cache_mutex);
208
 
  iter= proto_cache.find(table_path.c_str());
 
207
  iter= proto_cache.find(identifier.getPath());
209
208
 
210
209
  if (iter!= proto_cache.end())
211
210
    proto_cache.erase(iter);