40
40
#include <drizzled/data_home.h>
41
41
#include <drizzled/error.h>
42
42
#include <drizzled/table.h>
43
#include <drizzled/field/timestamp.h>
43
44
#include <drizzled/plugin/transactional_storage_engine.h>
45
46
#define my_strdup(a,b) strdup(a)
114
115
int doCommit(Session *, bool);
115
116
int doRollback(Session *, bool);
116
117
Cursor *create(Table& table);
117
bool doDropSchema(const drizzled::identifier::Schema&);
118
bool doDropSchema(const drizzled::SchemaIdentifier&);
120
121
* Indicates to a storage engine the start of a
138
int doCreateTable(Session&, Table&, const identifier::Table& ident, drizzled::message::Table& );
139
int doDropTable(Session &, const identifier::Table& );
141
int doRenameTable(Session&, const identifier::Table &from, const identifier::Table &to);
143
void doGetTableIdentifiers(drizzled::CachedDirectory &dir,
144
const drizzled::identifier::Schema &schema,
145
drizzled::identifier::Table::vector &set_of_identifiers)
139
int doCreateTable(Session&, Table&, const TableIdentifier& ident, drizzled::message::Table& );
140
int doDropTable(Session &, const TableIdentifier& );
142
int doRenameTable(Session&, const TableIdentifier &from, const TableIdentifier &to);
144
void doGetTableIdentifiers(drizzled::CachedDirectory &dir,
145
const drizzled::SchemaIdentifier &schema,
146
drizzled::TableIdentifiers &set_of_identifiers)
147
148
std::set<std::string> set_of_names;
149
150
doGetTableNames(dir, schema, set_of_names);
150
151
for (std::set<std::string>::iterator set_iter = set_of_names.begin(); set_iter != set_of_names.end(); ++set_iter)
152
set_of_identifiers.push_back(identifier::Table(schema, *set_iter));
153
set_of_identifiers.push_back(TableIdentifier(schema, *set_iter));
156
157
void doGetTableNames(CachedDirectory&,
157
const identifier::Schema &schema,
158
const SchemaIdentifier &schema,
158
159
std::set<std::string> &set_of_names)
160
161
bool isPBMS = schema.compare("PBMS");
168
169
int doReleaseSavepoint(Session *session, NamedSavepoint &savepoint);
169
170
const char **bas_ext() const;
171
int doGetTableDefinition(Session&, const identifier::Table &identifier,
172
int doGetTableDefinition(Session&, const TableIdentifier &identifier,
172
173
drizzled::message::Table &table_proto)
189
bool doDoesTableExist(Session&, const identifier::Table &identifier)
190
bool doDoesTableExist(Session&, const TableIdentifier &identifier)
191
192
const char *tab_name = identifier.getTableName().c_str();
192
193
const char *db_name = identifier.getSchemaName().c_str();
1045
1046
#ifdef DRIZZLED
1046
int PBMSStorageEngine::doCreateTable(Session&, Table&, const identifier::Table& , drizzled::message::Table& )
1047
int PBMSStorageEngine::doCreateTable(Session&, Table&, const TableIdentifier& , drizzled::message::Table& )
1048
1049
/* You cannot create PBMS tables. */
1049
1050
return( HA_ERR_WRONG_COMMAND );
1052
int PBMSStorageEngine::doDropTable(Session &, const identifier::Table& )
1053
int PBMSStorageEngine::doDropTable(Session &, const TableIdentifier& )
1054
1055
/* You cannot delete PBMS tables. */
1058
int PBMSStorageEngine::doRenameTable(Session&, const identifier::Table &, const identifier::Table &)
1059
int PBMSStorageEngine::doRenameTable(Session&, const TableIdentifier &, const TableIdentifier &)
1060
1061
/* You cannot rename PBMS tables. */
1061
1062
return( HA_ERR_WRONG_COMMAND );