List:Commits« Previous MessageNext Message »
From:gluh Date:September 6 2007 12:02pm
Subject:bk commit into 5.1 tree (gluh:1.2578) BUG#29263
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-09-06 17:02:37+05:00, gluh@stripped +4 -0
  Bug#29263 disabled storage engines omitted in SHOW ENGINES
  added filling of 'engines' table with disabled builtin plugins

  sql/sql_builtin.cc.in@stripped, 2007-09-06 17:02:34+05:00, gluh@stripped +2 -0
    added unused builtin plugins array

  sql/sql_plugin.cc@stripped, 2007-09-06 17:02:34+05:00, gluh@stripped +4 -0
    fill unused buitin plugin array with diabled plugins

  sql/sql_plugin.h@stripped, 2007-09-06 17:02:34+05:00, gluh@stripped +2 -0
    added unused builtin plugins array

  sql/sql_show.cc@stripped, 2007-09-06 17:02:34+05:00, gluh@stripped +24 -5
    added filling of 'engines' table with disabled builtin plugins

diff -Nrup a/sql/sql_builtin.cc.in b/sql/sql_builtin.cc.in
--- a/sql/sql_builtin.cc.in	2006-12-31 05:28:54 +04:00
+++ b/sql/sql_builtin.cc.in	2007-09-06 17:02:34 +05:00
@@ -25,3 +25,5 @@ struct st_mysql_plugin *mysqld_builtins[
   builtin_binlog_plugin@mysql_plugin_defs@,(struct st_mysql_plugin *)0
 };
 
+struct st_mysql_plugin *mysqld_builtins_unused[sizeof(mysqld_builtins)/sizeof(*mysqld_builtins)];
+
diff -Nrup a/sql/sql_plugin.cc b/sql/sql_plugin.cc
--- a/sql/sql_plugin.cc	2007-08-25 13:43:14 +05:00
+++ b/sql/sql_plugin.cc	2007-09-06 17:02:34 +05:00
@@ -1130,6 +1130,7 @@ int plugin_init(int *argc, char **argv, 
   /*
     First we register builtin plugins
   */
+  i= 0;
   for (builtins= mysqld_builtins; *builtins; builtins++)
   {
     for (plugin= *builtins; plugin->info; plugin++)
@@ -1144,7 +1145,10 @@ int plugin_init(int *argc, char **argv, 
 
       free_root(&tmp_root, MYF(MY_MARK_BLOCKS_FREE));
       if (test_plugin_options(&tmp_root, &tmp, argc, argv, def_enabled))
+      {
+        mysqld_builtins_unused[i++]= plugin;
         continue;
+      }
 
       if (register_builtin(plugin, &tmp, &plugin_ptr))
         goto err_unlock;
diff -Nrup a/sql/sql_plugin.h b/sql/sql_plugin.h
--- a/sql/sql_plugin.h	2007-06-12 20:41:54 +05:00
+++ b/sql/sql_plugin.h	2007-09-06 17:02:34 +05:00
@@ -136,4 +136,6 @@ typedef my_bool (plugin_foreach_func)(TH
 #define plugin_foreach(A,B,C,D) plugin_foreach_with_mask(A,B,C,PLUGIN_IS_READY,D)
 extern bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
                                      int type, uint state_mask, void *arg);
+extern struct st_mysql_plugin *mysqld_builtins_unused[];
+
 #endif
diff -Nrup a/sql/sql_show.cc b/sql/sql_show.cc
--- a/sql/sql_show.cc	2007-08-25 13:43:15 +05:00
+++ b/sql/sql_show.cc	2007-09-06 17:02:34 +05:00
@@ -3830,10 +3830,13 @@ static my_bool iter_schema_engines(THD *
                              strlen(plugin_decl(plugin)->descr), scs);
       tmp= &yesno[test(hton->commit)];
       table->field[3]->store(tmp->str, tmp->length, scs);
+      table->field[3]->set_notnull();
       tmp= &yesno[test(hton->prepare)];
       table->field[4]->store(tmp->str, tmp->length, scs);
+      table->field[4]->set_notnull();
       tmp= &yesno[test(hton->savepoint_set)];
       table->field[5]->store(tmp->str, tmp->length, scs);
+      table->field[5]->set_notnull();
 
       if (schema_table_store_record(thd, table))
         DBUG_RETURN(1);
@@ -3845,8 +3848,24 @@ static my_bool iter_schema_engines(THD *
 
 int fill_schema_engines(THD *thd, TABLE_LIST *tables, COND *cond)
 {
-  return plugin_foreach(thd, iter_schema_engines,
-                        MYSQL_STORAGE_ENGINE_PLUGIN, tables->table);
+  CHARSET_INFO *scs= system_charset_info;
+  TABLE *table= tables->table;
+  struct st_mysql_plugin *plugin, **builtins;
+  if (plugin_foreach(thd, iter_schema_engines,
+                     MYSQL_STORAGE_ENGINE_PLUGIN, table))
+    return 1;
+
+  for (builtins= mysqld_builtins_unused; *builtins; builtins++)
+  {
+    plugin= *builtins;
+    restore_record(table, s->default_values);
+    table->field[0]->store(plugin->name, strlen(plugin->name), scs);
+    table->field[1]->store(C_STRING_WITH_LEN("NO"), scs);
+    table->field[2]->store(plugin->descr, strlen(plugin->descr), scs);
+    if (schema_table_store_record(thd, table))
+      return 1;
+  }
+  return 0;
 }
 
 
@@ -6000,9 +6019,9 @@ ST_FIELD_INFO engines_fields_info[]=
   {"ENGINE", 64, MYSQL_TYPE_STRING, 0, 0, "Engine", SKIP_OPEN_TABLE},
   {"SUPPORT", 8, MYSQL_TYPE_STRING, 0, 0, "Support", SKIP_OPEN_TABLE},
   {"COMMENT", 80, MYSQL_TYPE_STRING, 0, 0, "Comment", SKIP_OPEN_TABLE},
-  {"TRANSACTIONS", 3, MYSQL_TYPE_STRING, 0, 0, "Transactions", SKIP_OPEN_TABLE},
-  {"XA", 3, MYSQL_TYPE_STRING, 0, 0, "XA", SKIP_OPEN_TABLE},
-  {"SAVEPOINTS", 3 ,MYSQL_TYPE_STRING, 0, 0, "Savepoints", SKIP_OPEN_TABLE},
+  {"TRANSACTIONS", 3, MYSQL_TYPE_STRING, 0, 1, "Transactions", SKIP_OPEN_TABLE},
+  {"XA", 3, MYSQL_TYPE_STRING, 0, 1, "XA", SKIP_OPEN_TABLE},
+  {"SAVEPOINTS", 3 ,MYSQL_TYPE_STRING, 0, 1, "Savepoints", SKIP_OPEN_TABLE},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
 };
 
Thread
bk commit into 5.1 tree (gluh:1.2578) BUG#29263gluh6 Sep
  • Re: bk commit into 5.1 tree (gluh:1.2578) BUG#29263Sergei Golubchik8 Sep