00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <config.h>
00020
00021 #include "internal_dictionary.h"
00022
00023 #include <drizzled/current_session.h>
00024
00025 #include "univ.i"
00026 #include "btr0sea.h"
00027 #include "os0file.h"
00028 #include "os0thread.h"
00029 #include "srv0start.h"
00030 #include "srv0srv.h"
00031 #include "trx0roll.h"
00032 #include "trx0trx.h"
00033 #include "trx0sys.h"
00034 #include "mtr0mtr.h"
00035 #include "row0ins.h"
00036 #include "row0mysql.h"
00037 #include "row0sel.h"
00038 #include "row0upd.h"
00039 #include "log0log.h"
00040 #include "lock0lock.h"
00041 #include "dict0crea.h"
00042 #include "btr0cur.h"
00043 #include "btr0btr.h"
00044 #include "fsp0fsp.h"
00045 #include "sync0sync.h"
00046 #include "fil0fil.h"
00047 #include "trx0xa.h"
00048 #include "row0merge.h"
00049 #include "thr0loc.h"
00050 #include "dict0boot.h"
00051 #include "ha_prototypes.h"
00052 #include "ut0mem.h"
00053 #include "ibuf0ibuf.h"
00054 #include "handler0vars.h"
00055
00056 using namespace drizzled;
00057
00058
00059
00060
00061
00062 InnodbInternalTables::InnodbInternalTables() :
00063 plugin::TableFunction("DATA_DICTIONARY", "INNODB_INTERNAL_TABLES")
00064 {
00065 add_field("TABLE_NAME");
00066 }
00067
00068 static void my_dict_print_callback(void *ptr, const char *table_name)
00069 {
00070 Recorder *myrec= static_cast<Recorder *>(ptr);
00071
00072 myrec->push(table_name);
00073 }
00074
00075 InnodbInternalTables::Generator::Generator(Field **arg) :
00076 plugin::TableFunction::Generator(arg)
00077 {
00078 dict_print_with_callback(my_dict_print_callback, &recorder);
00079 recorder.start();
00080 }
00081
00082 bool InnodbInternalTables::Generator::populate()
00083 {
00084 std::string table_name;
00085 bool more= recorder.next(table_name);
00086
00087 if (not more)
00088 return false;
00089
00090
00091 push(table_name);
00092
00093 return true;
00094 }