71
71
int doCreateTable(Session &session,
73
const identifier::Table &identifier,
73
const TableIdentifier &identifier,
74
74
message::Table &create_proto);
76
76
/* For whatever reason, internal tables can be created by Cursor::open()
84
84
message::Table &create_proto,
85
85
HP_SHARE **internal_share);
87
int doRenameTable(Session&, const identifier::Table &from, const identifier::Table &to);
87
int doRenameTable(Session&, const TableIdentifier &from, const TableIdentifier &to);
89
int doDropTable(Session&, const identifier::Table &identifier);
89
int doDropTable(Session&, const TableIdentifier &identifier);
91
91
int doGetTableDefinition(Session& session,
92
const identifier::Table &identifier,
92
const TableIdentifier &identifier,
93
93
message::Table &table_message);
95
95
uint32_t max_supported_keys() const { return MAX_KEY; }
100
100
return ( HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR);
103
bool doDoesTableExist(Session& session, const identifier::Table &identifier);
103
bool doDoesTableExist(Session& session, const TableIdentifier &identifier);
104
104
void doGetTableIdentifiers(CachedDirectory &directory,
105
const identifier::Schema &schema_identifier,
106
identifier::Table::vector &set_of_identifiers);
105
const SchemaIdentifier &schema_identifier,
106
TableIdentifier::vector &set_of_identifiers);
109
109
void HeapEngine::doGetTableIdentifiers(CachedDirectory&,
110
const identifier::Schema&,
111
identifier::Table::vector&)
110
const SchemaIdentifier&,
111
TableIdentifier::vector&)
115
bool HeapEngine::doDoesTableExist(Session& session, const identifier::Table &identifier)
115
bool HeapEngine::doDoesTableExist(Session& session, const TableIdentifier &identifier)
117
117
return session.getMessageCache().doesTableMessageExist(identifier);
120
120
int HeapEngine::doGetTableDefinition(Session &session,
121
const identifier::Table &identifier,
121
const TableIdentifier &identifier,
122
122
message::Table &table_proto)
124
124
if (session.getMessageCache().getTableMessage(identifier, table_proto))
130
130
We have to ignore ENOENT entries as the MEMORY table is created on open and
131
131
not when doing a CREATE on the table.
133
int HeapEngine::doDropTable(Session &session, const identifier::Table &identifier)
133
int HeapEngine::doDropTable(Session &session, const TableIdentifier &identifier)
135
135
session.getMessageCache().removeTableMessage(identifier);
176
176
#define MEMORY_STATS_UPDATE_THRESHOLD 10
178
int ha_heap::doOpen(const drizzled::identifier::Table &identifier, int mode, uint32_t test_if_locked)
178
int ha_heap::doOpen(const drizzled::TableIdentifier &identifier, int mode, uint32_t test_if_locked)
180
180
if ((test_if_locked & HA_OPEN_INTERNAL_TABLE) || (!(file= heap_open(identifier.getPath().c_str(), mode)) && errno == ENOENT))
240
240
Cursor *ha_heap::clone(memory::Root *)
242
242
Cursor *new_handler= getTable()->getMutableShare()->db_type()->getCursor(*getTable());
243
identifier::Table identifier(getTable()->getShare()->getSchemaName(),
243
TableIdentifier identifier(getTable()->getShare()->getSchemaName(),
244
244
getTable()->getShare()->getTableName(),
245
245
getTable()->getShare()->getPath());
626
int HeapEngine::doRenameTable(Session &session, const identifier::Table &from, const identifier::Table &to)
626
int HeapEngine::doRenameTable(Session &session, const TableIdentifier &from, const TableIdentifier &to)
628
628
session.getMessageCache().renameTableMessage(from, to);
629
629
return heap_rename(from.getPath().c_str(), to.getPath().c_str());
653
653
int HeapEngine::doCreateTable(Session &session,
654
654
Table &table_arg,
655
const identifier::Table &identifier,
655
const TableIdentifier &identifier,
656
656
message::Table& create_proto)