48
47
or for an intermediate table used in ALTER.
49
48
XXX Why are internal temporary tables added to this list?
52
50
Table *temporary_tables;
55
Table *getTemporaryTables()
57
return temporary_tables;
61
Mark all temporary tables which were used by the current statement or
62
substatement as free for reuse, but only if the query_id can be cleared.
64
@param session thread context
66
@remark For temp tables associated with a open SQL HANDLER the query_id
67
is not reset until the HANDLER is closed.
69
void mark_temp_tables_as_free_for_reuse();
72
void close_temporary_tables();
74
void close_temporary_table(Table *table);
75
// The method below just handles the de-allocation of the table. In
76
// a better memory type world, this would not be needed.
78
void nukeTable(Table *table);
81
/* Work with temporary tables */
82
Table *find_temporary_table(const TableIdentifier &identifier);
84
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,
89
bool link_in_list= true);
91
virtual query_id_t getQueryId() const= 0;
94
52
Table *derived_tables;
98
Table *getDerivedTables()
100
return derived_tables;
103
void setDerivedTables(Table *arg)
108
void clearDerivedTables()
111
derived_tables= NULL; // They should all be invalid by this point
115
54
During a MySQL session, one can lock tables in two modes: automatic
116
55
or manual. In automatic mode all necessary tables are locked just before
124
63
the 'LOCK_TABLES' chapter of the MySQL manual.
125
64
See also lock_tables() for details.
130
69
CREATE-SELECT keeps an extra lock for the table being
131
70
created. This field is used to keep the extra lock available for
132
71
lower level routines, which would otherwise miss that lock.
134
DrizzleLock *extra_lock;
73
DRIZZLE_LOCK *extra_lock;
137
76
uint32_t current_tablenr;
140
79
This constructor serves for creation of Open_tables_state instances
141
80
which are used as backup storage.
143
Open_tables_state() :
82
Open_tables_state() { }
152
83
virtual ~Open_tables_state() {}
154
void doGetTableNames(CachedDirectory &directory,
155
const SchemaIdentifier &schema_identifier,
156
std::set<std::string>& set_of_names);
157
void doGetTableNames(const SchemaIdentifier &schema_identifier,
158
std::set<std::string>& set_of_names);
160
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);
166
int doGetTableDefinition(const drizzled::TableIdentifier &identifier,
167
message::Table &table_proto);
168
bool doDoesTableExist(const drizzled::TableIdentifier &identifier);
171
85
Open_tables_state(uint64_t version_arg);