~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-03-29 12:04:36 UTC
  • mto: (2257.1.1 build) (2276.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: olafvdspek@gmail.com-20110329120436-vozkuer8vqgh027p
Always call assert()

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
 
21
 
#ifndef DRIZZLED_OPEN_TABLES_STATE_H
22
 
#define DRIZZLED_OPEN_TABLES_STATE_H
23
 
 
24
 
#include "drizzled/lock.h"
25
 
 
26
 
namespace drizzled
27
 
{
 
21
#pragma once
 
22
 
 
23
#include <drizzled/lock.h>
 
24
 
 
25
namespace drizzled {
28
26
 
29
27
/**
30
28
  Class that holds information about tables which were opened and locked
50
48
  */
51
49
private:
52
50
  Table *temporary_tables;
 
51
 
53
52
public:
54
53
 
55
54
  Table *getTemporaryTables()
70
69
 
71
70
protected:
72
71
  void close_temporary_tables();
 
72
 
73
73
public:
74
74
  void close_temporary_table(Table *table);
 
75
  
 
76
private:
75
77
  // The method below just handles the de-allocation of the table. In
76
78
  // a better memory type world, this would not be needed.
77
 
private:
78
79
  void nukeTable(Table *table);
 
80
 
79
81
public:
80
 
 
81
82
  /* Work with temporary tables */
82
 
  Table *find_temporary_table(const TableIdentifier &identifier);
 
83
  Table *find_temporary_table(const identifier::Table &identifier);
83
84
 
84
85
  void dumpTemporaryTableNames(const char *id);
85
 
  int drop_temporary_table(const drizzled::TableIdentifier &identifier);
86
 
  bool rm_temporary_table(plugin::StorageEngine *base, const TableIdentifier &identifier);
87
 
  bool rm_temporary_table(const drizzled::TableIdentifier &identifier, bool best_effort= false);
88
 
  Table *open_temporary_table(const drizzled::TableIdentifier &identifier,
 
86
  int drop_temporary_table(const drizzled::identifier::Table &identifier);
 
87
  bool rm_temporary_table(plugin::StorageEngine&, const identifier::Table&);
 
88
  bool rm_temporary_table(const drizzled::identifier::Table &identifier, bool best_effort= false);
 
89
  Table *open_temporary_table(const drizzled::identifier::Table &identifier,
89
90
                              bool link_in_list= true);
90
91
 
91
92
  virtual query_id_t getQueryId()  const= 0;
152
153
  virtual ~Open_tables_state() {}
153
154
 
154
155
  void doGetTableNames(CachedDirectory &directory,
155
 
                       const SchemaIdentifier &schema_identifier,
 
156
                       const identifier::Schema &schema_identifier,
156
157
                       std::set<std::string>& set_of_names);
157
 
  void doGetTableNames(const SchemaIdentifier &schema_identifier,
 
158
  void doGetTableNames(const identifier::Schema &schema_identifier,
158
159
                       std::set<std::string>& set_of_names);
159
160
 
160
161
  void doGetTableIdentifiers(CachedDirectory &directory,
161
 
                             const SchemaIdentifier &schema_identifier,
162
 
                             TableIdentifier::vector &set_of_identifiers);
163
 
  void doGetTableIdentifiers(const SchemaIdentifier &schema_identifier,
164
 
                             TableIdentifier::vector &set_of_identifiers);
 
162
                             const identifier::Schema &schema_identifier,
 
163
                             identifier::table::vector &set_of_identifiers);
 
164
  void doGetTableIdentifiers(const identifier::Schema &schema_identifier,
 
165
                             identifier::table::vector &set_of_identifiers);
165
166
 
166
 
  int doGetTableDefinition(const drizzled::TableIdentifier &identifier,
 
167
  int doGetTableDefinition(const drizzled::identifier::Table &identifier,
167
168
                           message::Table &table_proto);
168
 
  bool doDoesTableExist(const drizzled::TableIdentifier &identifier);
 
169
  bool doDoesTableExist(const drizzled::identifier::Table &identifier);
169
170
 
170
171
 
171
172
  Open_tables_state(uint64_t version_arg);
173
174
 
174
175
} /* namespace drizzled */
175
176
 
176
 
#endif /* DRIZZLED_OPEN_TABLES_STATE_H */