~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/open_tables_state.h

  • Committer: Olaf van der Spek
  • Date: 2011-04-05 12:26:58 UTC
  • mto: (2278.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2272.
  • Revision ID: olafvdspek@gmail.com-20110405122658-xxrvmobwwwwf3oct
Refactor Open_tables_state

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
 
21
20
#pragma once
22
21
 
 
22
#include <drizzled/common_fwd.h>
23
23
#include <drizzled/lock.h>
24
24
 
25
25
namespace drizzled {
26
26
 
 
27
extern uint64_t g_refresh_version;
 
28
 
27
29
/**
28
30
  Class that holds information about tables which were opened and locked
29
31
  by the thread.
66
68
  */
67
69
  void mark_temp_tables_as_free_for_reuse();
68
70
 
69
 
protected:
70
 
  void close_temporary_tables();
71
 
 
72
 
public:
73
 
  void close_temporary_table(Table *table);
74
 
  
75
 
private:
76
 
  // The method below just handles the de-allocation of the table. In
77
 
  // a better memory type world, this would not be needed.
78
 
  void nukeTable(Table *table);
79
 
 
80
71
public:
81
72
  /* Work with temporary tables */
82
73
  Table *find_temporary_table(const identifier::Table &identifier);
83
74
 
84
75
  void dumpTemporaryTableNames(const char *id);
85
 
  int drop_temporary_table(const drizzled::identifier::Table &identifier);
86
 
  bool rm_temporary_table(plugin::StorageEngine&, const identifier::Table&);
87
 
  bool rm_temporary_table(const drizzled::identifier::Table &identifier, bool best_effort= false);
88
76
 
89
77
  virtual query_id_t getQueryId()  const= 0;
90
78