~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-12-09 06:02:39 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20101209060239-t0ujftvcvd558yno
Tags: upstream-2010.12.05
ImportĀ upstreamĀ versionĀ 2010.12.05

Show diffs side-by-side

added added

removed removed

Lines of Context:
537
537
}
538
538
 
539
539
void Open_tables_state::doGetTableIdentifiers(const SchemaIdentifier &schema_identifier,
540
 
                                              TableIdentifiers &set_of_identifiers)
 
540
                                              TableIdentifier::vector &set_of_identifiers)
541
541
{
542
542
  for (Table *table= getTemporaryTables() ; table ; table= table->getNext())
543
543
  {
551
551
}
552
552
 
553
553
void Open_tables_state::doGetTableIdentifiers(CachedDirectory &,
554
 
                                    const SchemaIdentifier &schema_identifier,
555
 
                                    TableIdentifiers &set_of_identifiers)
 
554
                                              const SchemaIdentifier &schema_identifier,
 
555
                                              TableIdentifier::vector &set_of_identifiers)
556
556
{
557
557
  doGetTableIdentifiers(schema_identifier, set_of_identifiers);
558
558
}
716
716
  table that was locked with LOCK TABLES.
717
717
*/
718
718
 
719
 
void Session::drop_open_table(Table *table, TableIdentifier &identifier)
 
719
void Session::drop_open_table(Table *table, const TableIdentifier &identifier)
720
720
{
721
721
  if (table->getShare()->getType())
722
722
  {
730
730
      that something has happened.
731
731
    */
732
732
    unlink_open_table(table);
733
 
    quick_rm_table(*this, identifier);
 
733
    plugin::StorageEngine::dropTable(*this, identifier);
734
734
  }
735
735
}
736
736
 
833
833
  @retval  true   Error occured (OOM)
834
834
  @retval  false  Success. 'table' parameter set according to above rules.
835
835
*/
836
 
bool Session::lock_table_name_if_not_cached(TableIdentifier &identifier, Table **table)
 
836
bool Session::lock_table_name_if_not_cached(const TableIdentifier &identifier, Table **table)
837
837
{
838
838
  const TableIdentifier::Key &key(identifier.getKey());
839
839
 
1222
1222
  the strings are used in a loop even after the share may be freed.
1223
1223
*/
1224
1224
 
1225
 
void Session::close_data_files_and_morph_locks(TableIdentifier &identifier)
 
1225
void Session::close_data_files_and_morph_locks(const TableIdentifier &identifier)
1226
1226
{
1227
1227
  safe_mutex_assert_owner(table::Cache::singleton().mutex().native_handle()); /* Adjust locks at the end of ALTER TABLEL */
1228
1228
 
1834
1834
#  Table object
1835
1835
*/
1836
1836
 
1837
 
Table *Open_tables_state::open_temporary_table(TableIdentifier &identifier,
 
1837
Table *Open_tables_state::open_temporary_table(const TableIdentifier &identifier,
1838
1838
                                               bool link_in_list)
1839
1839
{
1840
1840
  assert(identifier.isTmp());
1842
1842
 
1843
1843
  table::Temporary *new_tmp_table= new table::Temporary(identifier.getType(),
1844
1844
                                                        identifier,
1845
 
                                                        const_cast<char *>(identifier.getPath().c_str()),
 
1845
                                                        const_cast<char *>(const_cast<TableIdentifier&>(identifier).getPath().c_str()),
1846
1846
                                                        static_cast<uint32_t>(identifier.getPath().length()));
1847
1847
  if (not new_tmp_table)
1848
1848
    return NULL;