49
49
#include "drizzled/global_charset_info.h"
50
50
#include "drizzled/charset.h"
51
51
#include "drizzled/internal/my_sys.h"
52
#include "drizzled/db.h"
54
53
#include <drizzled/table_proto.h>
55
54
#include <drizzled/plugin/event_observer.h>
366
Call this function in order to give the Cursor the possiblity
367
to ask engine if there are any new tables that should be written to disk
368
or any dropped tables that need to be removed from disk
370
int StorageEngine::getTableDefinition(Session& session,
371
const identifier::Table &identifier,
372
message::table::shared_ptr &table_message,
373
bool include_temporary_tables)
375
drizzled::error_t err= static_cast<drizzled::error_t>(ENOENT);
377
if (include_temporary_tables)
379
Table *table= session.find_temporary_table(identifier);
382
table_message.reset(new message::Table(*table->getShare()->getTableMessage()));
387
drizzled::message::table::shared_ptr table_ptr;
388
if ((table_ptr= drizzled::message::Cache::singleton().find(identifier)))
390
table_message= table_ptr;
393
message::Table message;
394
EngineVector::iterator iter=
395
std::find_if(vector_of_engines.begin(), vector_of_engines.end(),
396
StorageEngineGetTableDefinition(session, identifier, message, err));
398
if (iter == vector_of_engines.end())
402
table_message.reset(new message::Table(message));
404
drizzled::message::Cache::singleton().insert(identifier, table_message);
409
364
message::table::shared_ptr StorageEngine::getTableMessage(Session& session,
410
365
identifier::Table::const_reference identifier,
411
drizzled::error_t &error,
412
366
bool include_temporary_tables)
368
drizzled::error_t error;
414
369
error= static_cast<drizzled::error_t>(ENOENT);
416
371
if (include_temporary_tables)