~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/open_tables_state.h

  • Committer: Brian Aker
  • Date: 2011-02-17 10:09:00 UTC
  • mfrom: (2173.2.1 clean-include-usuage)
  • Revision ID: brian@tangent.org-20110217100900-4tpuxxzdl1sj00sh
Merge Monty for headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
21
21
#ifndef DRIZZLED_OPEN_TABLES_STATE_H
22
22
#define DRIZZLED_OPEN_TABLES_STATE_H
23
23
 
24
 
#include "drizzled/lock.h"
 
24
#include <drizzled/lock.h>
 
25
#include <drizzled/query_id.h>
25
26
 
26
27
namespace drizzled
27
28
{
28
29
 
 
30
class CachedDirectory;
 
31
 
29
32
/**
30
33
  Class that holds information about tables which were opened and locked
31
34
  by the thread. It is also used to save/restore this information in
50
53
  */
51
54
private:
52
55
  Table *temporary_tables;
 
56
 
53
57
public:
54
58
 
55
59
  Table *getTemporaryTables()
70
74
 
71
75
protected:
72
76
  void close_temporary_tables();
 
77
 
73
78
public:
74
79
  void close_temporary_table(Table *table);
 
80
  
 
81
private:
75
82
  // The method below just handles the de-allocation of the table. In
76
83
  // a better memory type world, this would not be needed.
77
 
private:
78
84
  void nukeTable(Table *table);
 
85
 
79
86
public:
80
 
 
81
87
  /* Work with temporary tables */
82
 
  Table *find_temporary_table(const TableIdentifier &identifier);
 
88
  Table *find_temporary_table(const identifier::Table &identifier);
83
89
 
84
90
  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,
 
91
  int drop_temporary_table(const drizzled::identifier::Table &identifier);
 
92
  bool rm_temporary_table(plugin::StorageEngine *base, const identifier::Table &identifier);
 
93
  bool rm_temporary_table(const drizzled::identifier::Table &identifier, bool best_effort= false);
 
94
  Table *open_temporary_table(const drizzled::identifier::Table &identifier,
89
95
                              bool link_in_list= true);
90
96
 
91
97
  virtual query_id_t getQueryId()  const= 0;
152
158
  virtual ~Open_tables_state() {}
153
159
 
154
160
  void doGetTableNames(CachedDirectory &directory,
155
 
                       const SchemaIdentifier &schema_identifier,
 
161
                       const identifier::Schema &schema_identifier,
156
162
                       std::set<std::string>& set_of_names);
157
 
  void doGetTableNames(const SchemaIdentifier &schema_identifier,
 
163
  void doGetTableNames(const identifier::Schema &schema_identifier,
158
164
                       std::set<std::string>& set_of_names);
159
165
 
160
166
  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);
 
167
                             const identifier::Schema &schema_identifier,
 
168
                             identifier::Table::vector &set_of_identifiers);
 
169
  void doGetTableIdentifiers(const identifier::Schema &schema_identifier,
 
170
                             identifier::Table::vector &set_of_identifiers);
165
171
 
166
 
  int doGetTableDefinition(const drizzled::TableIdentifier &identifier,
 
172
  int doGetTableDefinition(const drizzled::identifier::Table &identifier,
167
173
                           message::Table &table_proto);
168
 
  bool doDoesTableExist(const drizzled::TableIdentifier &identifier);
 
174
  bool doDoesTableExist(const drizzled::identifier::Table &identifier);
169
175
 
170
176
 
171
177
  Open_tables_state(uint64_t version_arg);