~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/ha_innodb.cc

  • Committer: Brian Aker
  • Date: 2010-03-31 05:53:34 UTC
  • Revision ID: brian@gaz-20100331055334-yqqmzlgqb2xq1p5b
Mass overhaul to use schema_identifier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
  doDropSchema(
384
384
  /*===================*/
385
385
                        /* out: error number */
386
 
        const std::string       &schema_name);  /* in: database path; inside InnoDB the name
 
386
        SchemaIdentifier        &identifier);   /* in: database path; inside InnoDB the name
387
387
                        of the last directory in the path is used as
388
388
                        the database name: for example, in 'mysql/data/test'
389
389
                        the database name is 'test' */
448
448
                           drizzled::message::Table &table_proto);
449
449
 
450
450
  void doGetTableNames(drizzled::CachedDirectory &directory,
451
 
                       std::string &db_name,
 
451
                       drizzled::SchemaIdentifier &schema_identifier,
452
452
                       std::set<std::string> &set_of_names);
453
453
 
454
454
  bool doDoesTableExist(drizzled::Session& session, drizzled::TableIdentifier &identifier);
485
485
  return -1;
486
486
}
487
487
 
488
 
void InnobaseEngine::doGetTableNames(CachedDirectory &directory, string&, set<string>& set_of_names)
 
488
void InnobaseEngine::doGetTableNames(CachedDirectory &directory, SchemaIdentifier&, set<string>& set_of_names)
489
489
{
490
490
  CachedDirectory::Entries entries= directory.getEntries();
491
491
 
6012
6012
bool
6013
6013
InnobaseEngine::doDropSchema(
6014
6014
/*===================*/
6015
 
                             const std::string &schema_name)
 
6015
                             SchemaIdentifier &identifier)
6016
6016
                /*!< in: database path; inside InnoDB the name
6017
6017
                        of the last directory in the path is used as
6018
6018
                        the database name: for example, in 'mysql/data/test'
6020
6020
{
6021
6021
        trx_t*  trx;
6022
6022
        int     error;
6023
 
        string schema_path(schema_name);
 
6023
        string schema_path(identifier.getPath());
6024
6024
        Session*        session         = current_session;
6025
6025
 
6026
6026
        /* Get the transaction associated with the current session, or create one
6161
6161
        error = convert_error_code_to_mysql(error, 0, NULL);
6162
6162
 
6163
6163
        if (not error)
 
6164
        {
 
6165
          // If this fails, we are in trouble
6164
6166
          plugin::StorageEngine::renameDefinitionFromPath(to, from);
 
6167
        }
6165
6168
 
6166
6169
        return(error);
6167
6170
}