~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-10-25 19:05:24 UTC
  • mto: (1887.2.1 merge)
  • mto: This revision was merged to the branch mainline in revision 1888.
  • Revision ID: brian@tangent.org-20101025190524-mqi7qr9d90itf3hg
Move unused under table

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
#include "drizzled/plugin/authorization.h"
56
56
#include "drizzled/table/temporary.h"
57
57
#include "drizzled/table/placeholder.h"
58
 
#include "drizzled/unused_tables.h"
 
58
#include "drizzled/table/unused.h"
59
59
 
60
60
using namespace std;
61
61
 
128
128
{
129
129
  refresh_version++;                            // Force close of open tables
130
130
 
131
 
  getUnused().clear();
 
131
  table::getUnused().clear();
132
132
  get_open_cache().clear();
133
133
}
134
134
 
203
203
  table->intern_close_table();
204
204
  if (not table->in_use)
205
205
  {
206
 
    getUnused().unlink(table);
 
206
    table::getUnused().unlink(table);
207
207
  }
208
208
 
209
209
  delete table;
249
249
    {
250
250
      refresh_version++;                                // Force close of open tables
251
251
 
252
 
      getUnused().clear();
 
252
      table::getUnused().clear();
253
253
 
254
254
      if (wait_for_refresh)
255
255
      {
433
433
    table->cursor->ha_reset();
434
434
    table->in_use= false;
435
435
 
436
 
    getUnused().link(table);
 
436
    table::getUnused().link(table);
437
437
  }
438
438
 
439
439
  return found_old_table;
1175
1175
      }
1176
1176
      if (table)
1177
1177
      {
1178
 
        getUnused().unlink(dynamic_cast<table::Concurrent *>(table));
 
1178
        table::getUnused().unlink(dynamic_cast<table::Concurrent *>(table));
1179
1179
        table->in_use= this;
1180
1180
      }
1181
1181
      else
1183
1183
        /* Insert a new Table instance into the open cache */
1184
1184
        int error;
1185
1185
        /* Free cache if too big */
1186
 
        getUnused().cull();
 
1186
        table::getUnused().cull();
1187
1187
 
1188
1188
        if (table_list->isCreate())
1189
1189
        {
4094
4094
    {
4095
4095
      table->getMutableShare()->resetVersion();                 /* Free when thread is ready */
4096
4096
      if (not table->in_use)
4097
 
        getUnused().relink(table);
 
4097
        table::getUnused().relink(table);
4098
4098
    }
4099
4099
  }
4100
4100
 
4101
 
  getUnused().cullByVersion();
 
4101
  table::getUnused().cullByVersion();
4102
4102
}
4103
4103
 
4104
4104
 
4139
4139
      table->getMutableShare()->resetVersion();         /* Free when thread is ready */
4140
4140
      if (not (in_use= table->in_use))
4141
4141
      {
4142
 
        getUnused().relink(table);
 
4142
        table::getUnused().relink(table);
4143
4143
      }
4144
4144
      else if (in_use != session)
4145
4145
      {
4177
4177
      }
4178
4178
    }
4179
4179
 
4180
 
    getUnused().cullByVersion();
 
4180
    table::getUnused().cullByVersion();
4181
4181
 
4182
4182
    /* Remove table from table definition cache if it's not in use */
4183
4183
    TableShare::release(identifier);