Commit d9aa8215 authored by Sergey Vojtovich's avatar Sergey Vojtovich

WL#5496 - Plugin LOAD_OPTION in INFORMATION_SCHEMA.PLUGINS

This patch implements I_S.PLUGINS.LOAD_OPTION column
as specified by WL#5496.

mysql-test/r/plugin_load_option.result:
  A test case for WL#5496.
mysql-test/suite/funcs_1/r/is_columns_is.result:
  Adjusted a test case according to WL#5496.
mysql-test/t/plugin_load_option.test:
  A test case for WL#5496.
sql/sql_show.cc:
  Added LOAD_OPTION column to I_S.PLUGINS.
parent 37afe1b3
UNINSTALL PLUGIN example;
ERROR HY000: Plugin 'example' is force_plus_permanent and can not be unloaded
SELECT PLUGIN_NAME, PLUGIN_STATUS, LOAD_OPTION FROM INFORMATION_SCHEMA.PLUGINS
WHERE PLUGIN_NAME IN ('MyISAM', 'EXAMPLE');
PLUGIN_NAME PLUGIN_STATUS LOAD_OPTION
MyISAM ACTIVE FORCE
EXAMPLE ACTIVE FORCE_PLUS_PERMANENT
......@@ -165,6 +165,7 @@ def information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8
def information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
def information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
def information_schema PLUGINS LOAD_OPTION 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
def information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
......@@ -562,6 +563,7 @@ NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21
3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema PLUGINS LOAD_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
3.0000 information_schema PROCESSLIST USER varchar 16 48 utf8 utf8_general_ci varchar(16)
3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64)
......
......@@ -3,3 +3,6 @@
--error ER_PLUGIN_IS_PERMANENT
UNINSTALL PLUGIN example;
SELECT PLUGIN_NAME, PLUGIN_STATUS, LOAD_OPTION FROM INFORMATION_SCHEMA.PLUGINS
WHERE PLUGIN_NAME IN ('MyISAM', 'EXAMPLE');
......@@ -211,6 +211,11 @@ static my_bool show_plugins(THD *thd, plugin_ref plugin,
}
table->field[9]->set_notnull();
table->field[10]->store(
global_plugin_typelib_names[plugin_load_option(plugin)],
strlen(global_plugin_typelib_names[plugin_load_option(plugin)]),
cs);
return schema_table_store_record(thd, table);
}
......@@ -7214,6 +7219,7 @@ ST_FIELD_INFO plugin_fields_info[]=
{"PLUGIN_AUTHOR", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
{"PLUGIN_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
{"PLUGIN_LICENSE", 80, MYSQL_TYPE_STRING, 0, 1, "License", SKIP_OPEN_TABLE},
{"LOAD_OPTION", 64, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment