List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:December 15 2008 9:25am
Subject:bzr push into mysql-6.0-rpl branch (zhenxing.he:2743) Bug#40129 Bug#40142
Bug#40636 Bug#41108 Bug#41186
View as plain text  
 2743 He Zhenxing	2008-12-15 [merge]
      Auto merge
modified:
  mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
  mysql-test/include/wait_for_slave_sql_error.inc
  mysql-test/include/wait_until_disconnected.inc
  mysql-test/lib/mtr_cases.pm
  mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
  mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
  mysql-test/suite/rpl/t/rpl_start_stop_slave.test
  mysql-test/suite/rpl/t/rpl_stm_mystery22.test
  mysql-test/t/disabled.def

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2008-11-12 20:04:19 +0000
+++ b/sql/handler.cc	2008-12-03 07:59:13 +0000
@@ -410,7 +410,13 @@ int ha_finalize_handlerton(st_plugin_int
     reuse an array slot. Otherwise the number of uninstall/install
     cycles would be limited.
   */
-  hton2plugin[hton->slot]= NULL;
+  if (hton->slot != HA_SLOT_UNDEF)
+  {
+    /* Make sure we are not unpluging another plugin */
+    DBUG_ASSERT(hton2plugin[hton->slot] == plugin);
+    DBUG_ASSERT(hton->slot < MAX_HA);
+    hton2plugin[hton->slot]= NULL;
+  }
 
   my_free((uchar*)hton, MYF(0));
 
@@ -435,6 +441,7 @@ int ha_initialize_handlerton(st_plugin_i
     not initialized.
    */
   bzero(hton, sizeof(hton));
+  hton->slot= HA_SLOT_UNDEF;
   /* Historical Requirement */
   plugin->data= hton; // shortcut for the future
   if (plugin->plugin->init)

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2008-11-12 15:23:22 +0000
+++ b/sql/handler.h	2008-12-03 07:59:13 +0000
@@ -278,6 +278,13 @@ typedef Bitmap<HA_MAX_ALTER_FLAGS> HA_AL
 #define MAX_HA 15
 
 /*
+  Use this instead of 0 as the initial value for the slot number of
+  handlerton, so that we can distinguish uninitialized slot number
+  from slot 0.
+*/
+#define HA_SLOT_UNDEF ((uint)-1)
+
+/*
   Parameters for open() (in register form->filestat)
   HA_GET_INFO does an implicit HA_ABORT_IF_LOCKED
 */

Thread
bzr push into mysql-6.0-rpl branch (zhenxing.he:2743) Bug#40129 Bug#40142Bug#40636 Bug#41108 Bug#41186He Zhenxing15 Dec