23#include <plugin/show_dictionary/dictionary.h>
24#include <drizzled/open_tables_state.h>
29ShowTemporaryTables::ShowTemporaryTables() :
30 show_dictionary::Show(
"SHOW_TEMPORARY_TABLES")
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);
39ShowTemporaryTables::Generator::Generator(
Field **arg) :
40 show_dictionary::Show::Generator(arg),
43 table= session.open_tables.getTemporaryTables();
46bool ShowTemporaryTables::Generator::populate()
50 if (not isWild(table->getShare()->getTableName()))
54 table= table->getNext();
62 table= table->getNext();
67void 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.