~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Lee Bieber
  • Date: 2010-10-26 01:01:10 UTC
  • mfrom: (1878.1.2 merge)
  • Revision ID: kalebral@gmail.com-20101026010110-tcr5mh06md4fro2a
Merge Brian - Remove dynamic cast, causing performance issues in our benchmarks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
 
111
111
  table::Concurrent *setTable(Table *arg)
112
112
  {
113
 
    return tables= dynamic_cast<table::Concurrent *>(arg);
 
113
    return tables= static_cast<table::Concurrent *>(arg);
114
114
  }
115
115
 
116
116
public:
499
499
bool Session::free_cached_table()
500
500
{
501
501
  bool found_old_table= false;
502
 
  table::Concurrent *table= dynamic_cast<table::Concurrent *>(open_tables);
 
502
  table::Concurrent *table= static_cast<table::Concurrent *>(open_tables);
503
503
 
504
504
  safe_mutex_assert_owner(LOCK_open.native_handle());
505
505
  assert(table->key_read == 0);
847
847
      *prev= list->getNext();
848
848
 
849
849
      /* Close table. */
850
 
      remove_table(dynamic_cast<table::Concurrent *>(list));
 
850
      remove_table(static_cast<table::Concurrent *>(list));
851
851
    }
852
852
    else
853
853
    {
1267
1267
      }
1268
1268
      if (table)
1269
1269
      {
1270
 
        unused_tables.unlink(dynamic_cast<table::Concurrent *>(table));
 
1270
        unused_tables.unlink(static_cast<table::Concurrent *>(table));
1271
1271
        table->in_use= this;
1272
1272
      }
1273
1273
      else
1475
1475
    next= table->getNext();
1476
1476
 
1477
1477
    my_error(ER_CANT_REOPEN_TABLE, MYF(0), table->getAlias());
1478
 
    remove_table(dynamic_cast<table::Concurrent *>(table));
 
1478
    remove_table(static_cast<table::Concurrent *>(table));
1479
1479
    error= 1;
1480
1480
  }
1481
1481
  *prev=0;
1727
1727
      else
1728
1728
      {
1729
1729
        /* We already have a name lock, remove copy */
1730
 
        remove_table(dynamic_cast<table::Concurrent *>(table));
 
1730
        remove_table(static_cast<table::Concurrent *>(table));
1731
1731
      }
1732
1732
    }
1733
1733
    else