List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:September 9 2010 11:16am
Subject:bzr commit into mysql-next-mr branch (svoj:3194) WL#5496
View as plain text  
#At file:///home/svoj/mysql/server/mysql-next-mr-wl5341/ based on revid:svoj@stripped

 3194 Sergey Vojtovich	2010-09-09
      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.

    modified:
      mysql-test/r/plugin_load_option.result
      mysql-test/suite/funcs_1/r/is_columns_is.result
      mysql-test/t/plugin_load_option.test
      sql/sql_show.cc
=== modified file 'mysql-test/r/plugin_load_option.result'
--- a/mysql-test/r/plugin_load_option.result	2010-09-07 10:49:09 +0000
+++ b/mysql-test/r/plugin_load_option.result	2010-09-09 11:16:00 +0000
@@ -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

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_is.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result	2010-07-16 15:04:39 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result	2010-09-09 11:16:00 +0000
@@ -165,6 +165,7 @@ def	information_schema	PARTITIONS	TABLE_
 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	CHECK
 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)

=== modified file 'mysql-test/t/plugin_load_option.test'
--- a/mysql-test/t/plugin_load_option.test	2010-09-07 10:49:09 +0000
+++ b/mysql-test/t/plugin_load_option.test	2010-09-09 11:16:00 +0000
@@ -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');

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-09-01 13:06:14 +0000
+++ b/sql/sql_show.cc	2010-09-09 11:16:00 +0000
@@ -211,6 +211,11 @@ static my_bool show_plugins(THD *thd, pl
   }
   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);
 }
 
@@ -7219,6 +7224,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}
 };
 


Attachment: [text/bzr-bundle] bzr/svoj@sun.com-20100909111600-othudmzt8dm92fhg.bundle
Thread
bzr commit into mysql-next-mr branch (svoj:3194) WL#5496Sergey Vojtovich9 Sep