26
26
#include "drizzled/server_includes.h"
27
30
#include "drizzled/session.h"
28
31
#include "drizzled/show.h"
32
#include "drizzled/plugin/library.h"
30
34
#include "helper_methods.h"
31
35
#include "modules.h"
35
38
using namespace drizzled;
36
39
using namespace std;
158
161
Session *session;
160
163
plugin::InfoSchemaTable *schema_table;
165
const string LICENSE_GPL_STRING;
166
const string LICENSE_BSD_STRING;
167
const string LICENSE_LGPL_STRING;
168
const string LICENSE_PROPRIETARY_STRING;
162
ShowModules(Session *session_arg, Table *table_arg, plugin::InfoSchemaTable *sch_tab_arg)
163
: session(session_arg), table(table_arg), schema_table(sch_tab_arg) {}
171
ShowModules(Session *session_arg, Table *table_arg,
172
plugin::InfoSchemaTable *sch_tab_arg)
173
: session(session_arg), table(table_arg), schema_table(sch_tab_arg),
174
LICENSE_GPL_STRING("GPL"),
175
LICENSE_BSD_STRING("BSD"),
176
LICENSE_LGPL_STRING("LGPL"),
177
LICENSE_PROPRIETARY_STRING("PROPRIETARY")
165
180
result_type operator() (argument_type module)
207
222
table->field[3]->store(STRING_WITH_LEN("NO"),cs);
208
table->field[4]->store(module->plugin_dl->dl.str,
209
module->plugin_dl->dl.length, cs);
223
table->field[4]->store(module->plugin_dl->getName().c_str(),
224
module->plugin_dl->getName().size(), cs);
212
227
if (manifest.descr)
222
237
switch (manifest.license) {
223
238
case PLUGIN_LICENSE_GPL:
224
table->field[6]->store(drizzled::plugin::LICENSE_GPL_STRING.c_str(),
225
drizzled::plugin::LICENSE_GPL_STRING.size(), cs);
239
table->field[6]->store(LICENSE_GPL_STRING.c_str(),
240
LICENSE_GPL_STRING.size(), cs);
227
242
case PLUGIN_LICENSE_BSD:
228
table->field[6]->store(drizzled::plugin::LICENSE_BSD_STRING.c_str(),
229
drizzled::plugin::LICENSE_BSD_STRING.size(), cs);
243
table->field[6]->store(LICENSE_BSD_STRING.c_str(),
244
LICENSE_BSD_STRING.size(), cs);
231
246
case PLUGIN_LICENSE_LGPL:
232
table->field[6]->store(drizzled::plugin::LICENSE_LGPL_STRING.c_str(),
233
drizzled::plugin::LICENSE_LGPL_STRING.size(), cs);
247
table->field[6]->store(LICENSE_LGPL_STRING.c_str(),
248
LICENSE_LGPL_STRING.size(), cs);
236
table->field[6]->store(drizzled::plugin::LICENSE_PROPRIETARY_STRING.c_str(),
237
drizzled::plugin::LICENSE_PROPRIETARY_STRING.size(),
251
table->field[6]->store(LICENSE_PROPRIETARY_STRING.c_str(),
252
LICENSE_PROPRIETARY_STRING.size(),