610
Utility method which hides some of the details of getTableDefinition()
612
bool plugin::StorageEngine::doesTableExist(Session& session,
613
TableIdentifier &identifier,
614
bool include_temporary_tables)
616
return (plugin::StorageEngine::getTableDefinition(session, identifier, NULL, include_temporary_tables) == EEXIST);
610
620
Call this function in order to give the Cursor the possiblity
611
621
to ask engine if there are any new tables that should be written to disk
612
622
or any dropped tables that need to be removed from disk
614
624
int plugin::StorageEngine::getTableDefinition(Session& session,
615
625
TableIdentifier &identifier,
616
message::Table *table_proto)
626
message::Table *table_proto,
627
bool include_temporary_tables)
618
629
return getTableDefinition(session,
619
630
identifier.getPath(), identifier.getDBName(), identifier.getTableName(), identifier.isTmp(),
631
table_proto, include_temporary_tables);
623
634
int plugin::StorageEngine::getTableDefinition(Session& session,
624
635
const char* path,
636
const char *schema_name,
637
const char *table_name,
628
message::Table *table_proto)
639
message::Table *table_proto,
640
bool include_temporary_tables)
644
if (include_temporary_tables)
646
if (session.doGetTableDefinition(path, schema_name, table_name, false, table_proto) == EEXIST)
632
650
vector<plugin::StorageEngine *>::iterator iter=
633
651
find_if(vector_of_engines.begin(), vector_of_engines.end(),
634
652
StorageEngineGetTableDefinition(session, path, NULL, NULL, true, table_proto, &err));