MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Kristofer Pettersson Date:September 4 2009 10:32am
Subject:bzr commit into mysql-5.1 branch (kristofer.pettersson:3103) Bug#46486
View as plain text  
#At file:///Users/thek/Development/51-bug46486/ based on revid:kristofer.pettersson@stripped

 3103 Kristofer Pettersson	2009-09-04
      Bug#46486 warnings produced when running mysql_install_db
      
      Incremental patch part 2
      
      Removing dead code and changing a note level message to a warning.
     @ sql/sql_plugin.cc
        * Remove free_slots. The only purpose for this variable was to trigger
          a redundant warning message  and it failed.
        * Change the note level message about shutting down plugins which
          didn't end nicely to a warning level message. (If this shutdown
          fails and there still are reference counts in the plugin an
          additional error level message is emitted)

    modified:
      sql/sql_plugin.cc
=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc	2009-09-03 10:08:55 +0000
+++ b/sql/sql_plugin.cc	2009-09-04 10:32:21 +0000
@@ -1520,7 +1520,7 @@ error:
 
 void plugin_shutdown(void)
 {
-  uint i, count= plugin_array.elements, free_slots= 0;
+  uint i, count= plugin_array.elements;
   struct st_plugin_int **plugins, *plugin;
   struct st_plugin_dl **dl;
   DBUG_ENTER("plugin_shutdown");
@@ -1541,18 +1541,13 @@ void plugin_shutdown(void)
     while (reap_needed && (count= plugin_array.elements))
     {
       reap_plugins();
-      for (i= free_slots= 0; i < count; i++)
+      for (i= 0; i < count; i++)
       {
         plugin= *dynamic_element(&plugin_array, i, struct st_plugin_int **);
-        switch (plugin->state) {
-        case PLUGIN_IS_READY:
+        if (plugin->state == PLUGIN_IS_READY)
+        {
           plugin->state= PLUGIN_IS_DELETED;
           reap_needed= true;
-          break;
-        case PLUGIN_IS_FREED:
-        case PLUGIN_IS_UNINITIALIZED:
-          free_slots++;
-          break;
         }
       }
       if (!reap_needed)
@@ -1586,8 +1581,8 @@ void plugin_shutdown(void)
       if (!(plugins[i]->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_FREED |
                                  PLUGIN_IS_DISABLED)))
       {
-        sql_print_information("Plugin '%s' will be forced to shutdown",
-                              plugins[i]->name.str);
+        sql_print_warning("Plugin '%s' will be forced to shutdown",
+                          plugins[i]->name.str);
         /*
           We are forcing deinit on plugins so we don't want to do a ref_count
           check until we have processed all the plugins.


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.1 branch (kristofer.pettersson:3103) Bug#46486Kristofer Pettersson4 Sep
  • Re: bzr commit into mysql-5.1 branch (kristofer.pettersson:3103)Bug#46486Sergei Golubchik14 Sep