summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-09-27 17:03:27 +0400
committerSergey Vojtovich <svoj@sun.com>2010-09-27 17:03:27 +0400
commitd9aa82154b02ec2e6bccb0048f9e0c94b6b0af6b (patch)
tree743c1fc1f8958c445d49354119c77194832cd37e
parent37afe1b34a20ffebe98381629ec615bd5957518a (diff)
downloadmariadb-git-d9aa82154b02ec2e6bccb0048f9e0c94b6b0af6b.tar.gz
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.
-rw-r--r--mysql-test/r/plugin_load_option.result5
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is.result2
-rw-r--r--mysql-test/t/plugin_load_option.test3
-rw-r--r--sql/sql_show.cc6
4 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/plugin_load_option.result b/mysql-test/r/plugin_load_option.result
index 3e49e3c6b47..fec41bac8e6 100644
--- a/mysql-test/r/plugin_load_option.result
+++ b/mysql-test/r/plugin_load_option.result
@@ -1,2 +1,7 @@
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
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result
index ea13b8619ce..ba64ea0887e 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result
@@ -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)
diff --git a/mysql-test/t/plugin_load_option.test b/mysql-test/t/plugin_load_option.test
index 604be30b561..e49b693b5be 100644
--- a/mysql-test/t/plugin_load_option.test
+++ b/mysql-test/t/plugin_load_option.test
@@ -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');
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 6b24e3db7bc..10b918b2505 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -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}
};