267
class ShowPlugins : public unary_function<st_plugin_int *, bool>
272
ShowPlugins(Session *session_arg, Table *table_arg)
273
: session(session_arg), table(table_arg) {}
275
result_type operator() (argument_type plugin)
277
struct drizzled_plugin_manifest *plug= plugin_decl(plugin);
278
const CHARSET_INFO * const cs= system_charset_info;
280
table->restoreRecordAsDefault();
282
table->field[0]->store(plugin_name(plugin)->str,
283
plugin_name(plugin)->length, cs);
287
table->field[1]->store(plug->version, strlen(plug->version), cs);
288
table->field[1]->set_notnull();
291
table->field[1]->set_null();
293
if (plugin->isInited)
295
table->field[2]->store(STRING_WITH_LEN("ACTIVE"), cs);
299
table->field[2]->store(STRING_WITH_LEN("INACTIVE"), cs);
304
table->field[3]->store(plug->author, strlen(plug->author), cs);
305
table->field[3]->set_notnull();
309
table->field[3]->set_null();
314
table->field[4]->store(plug->descr, strlen(plug->descr), cs);
315
table->field[4]->set_notnull();
319
table->field[4]->set_null();
322
switch (plug->license) {
323
case PLUGIN_LICENSE_GPL:
324
table->field[5]->store(PLUGIN_LICENSE_GPL_STRING,
325
strlen(PLUGIN_LICENSE_GPL_STRING), cs);
327
case PLUGIN_LICENSE_BSD:
328
table->field[5]->store(PLUGIN_LICENSE_BSD_STRING,
329
strlen(PLUGIN_LICENSE_BSD_STRING), cs);
331
case PLUGIN_LICENSE_LGPL:
332
table->field[5]->store(PLUGIN_LICENSE_LGPL_STRING,
333
strlen(PLUGIN_LICENSE_LGPL_STRING), cs);
336
table->field[5]->store(PLUGIN_LICENSE_PROPRIETARY_STRING,
337
strlen(PLUGIN_LICENSE_PROPRIETARY_STRING), cs);
340
table->field[5]->set_notnull();
342
return schema_table_store_record(session, table);
346
int PluginsISMethods::fillTable(Session *session, TableList *tables, COND *)
348
Table *table= tables->table;
350
PluginRegistry ®istry= PluginRegistry::getPluginRegistry();
351
vector<st_plugin_int *> plugins= registry.get_list(true);
352
vector<st_plugin_int *>::iterator iter=
353
find_if(plugins.begin(), plugins.end(), ShowPlugins(session, table));
354
if (iter != plugins.end())
267
361
int ProcessListISMethods::fillTable(Session* session, TableList* tables, COND*)
269
363
Table *table= tables->table;