23 #include <plugin/show_dictionary/dictionary.h>
24 #include <drizzled/open_tables_state.h>
29 ShowTemporaryTables::ShowTemporaryTables() :
32 add_field(
"TABLE_SCHEMA", plugin::TableFunction::STRING, MAXIMUM_IDENTIFIER_LENGTH,
false);
33 add_field(
"TABLE_NAME", plugin::TableFunction::STRING, MAXIMUM_IDENTIFIER_LENGTH,
false);
34 add_field(
"RECORDS", plugin::TableFunction::NUMBER, 0,
false);
35 add_field(
"RECORD_LENGTH", plugin::TableFunction::NUMBER, 0,
false);
39 ShowTemporaryTables::Generator::Generator(
Field **arg) :
43 table= session.open_tables.getTemporaryTables();
46 bool ShowTemporaryTables::Generator::populate()
50 if (not isWild(table->getShare()->getTableName()))
54 table= table->getNext();
62 table= table->getNext();
67 void ShowTemporaryTables::Generator::fill()
70 push(table->getShare()->getSchemaName());
73 push(table->getShare()->getTableName());
76 push(static_cast<uint64_t>(table->getCursor().records()));
79 push(static_cast<uint64_t>(table->getRecordLength()));
82 push(table->getEngine()->getName());
TODO: Rename this file - func.h is stupid.