~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/cache.cc

  • Committer: Brian Aker
  • Date: 2011-01-06 05:17:09 UTC
  • Revision ID: brian@tangent.org-20110106051709-oa0se8ur02uc6i9o
Added native functions into the function table.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <fcntl.h>
26
26
 
27
27
 
28
 
#include "drizzled/identifier.h"
 
28
#include "drizzled/identifier/table.h"
29
29
#include "drizzled/table.h"
30
30
#include "drizzled/session.h"
31
31
#include "drizzled/table/concurrent.h"
67
67
    getUnused().unlink(table);
68
68
  }
69
69
 
70
 
  boost::checked_delete(table);
 
70
  delete table;
71
71
}
72
72
 
73
73
void remove_table(table::Concurrent *arg)
99
99
{
100
100
  do
101
101
  {
102
 
    const identifier::Table::Key &key(table->getShare()->getCacheKey());
 
102
    const TableIdentifier::Key &key(table->getShare()->getCacheKey());
103
103
 
104
104
    table::CacheRange ppp= table::getCache().equal_range(key);
105
105
 
136
136
and afterwards delete those marked unused.
137
137
*/
138
138
 
139
 
void Cache::removeSchema(const identifier::Schema &schema_identifier)
 
139
void Cache::removeSchema(const SchemaIdentifier &schema_identifier)
140
140
{
141
141
  boost::mutex::scoped_lock scopedLock(_mutex);
142
142
 
172
172
  1  Table is in use by another thread
173
173
*/
174
174
 
175
 
bool Cache::removeTable(Session *session, identifier::Table &identifier, uint32_t flags)
 
175
bool Cache::removeTable(Session *session, TableIdentifier &identifier, uint32_t flags)
176
176
{
177
 
  const identifier::Table::Key &key(identifier.getKey());
 
177
  const TableIdentifier::Key &key(identifier.getKey());
178
178
  bool result= false; 
179
179
  bool signalled= false;
180
180
 
235
235
    table::getUnused().cullByVersion();
236
236
 
237
237
    /* Remove table from table definition cache if it's not in use */
238
 
    table::instance::release(identifier);
 
238
    TableShare::release(identifier);
239
239
 
240
240
    if (result && (flags & RTFC_WAIT_OTHER_THREAD_FLAG))
241
241
    {