List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:July 27 2009 4:13pm
Subject:bzr push into mysql-5.4 branch (alik:2830 to 2831)
View as plain text  
 2831 Alexander Nozdrin	2009-07-27
      Remove --deadlock-xxx command line options.

    modified:
      mysql-test/r/show_check.result
      mysql-test/t/show_check.test
      sql/mysqld.cc
      sql/set_var.cc
 2830 Dmitry Lenev	2009-07-25
      Fix for bug #39674 "On shutdown mdl_destroy() called before
      plugin_shutdown()".
      
      Attempt to shutdown PBXT engine plugin led to assertion failure
      caused by using already destroyed mutex in metadata locking
      subsystem.
      
      This problem stemmed from the fact that we MDL subsystem and
      table definition cache were deinitialized before plugin shutdown
      while PBXT plugin during its shutdown process accessed tables and
      therefore expected them to be in working shape.
      
      This patch solves this problem by moving deinitialization of
      these two subsystems after plugins are shut down.
      
      No test case is provided since such test case would require
      using PBXT or other plugin which accesses tables during its
      shutdown process.
     @ sql/mysql_priv.h
        Introduced table_def_start_shutdown() function which informs
        table definition cache that shutdown process has been started
        so it has to keep number of TABLE and TABLE_SHARE objects minimal
        in order to reduce number of references to pluggable engines.
     @ sql/mysqld.cc
        Destroy table definition cache and meta-data locking subsystem
        after shutting down plugins. This allows plugins to work with
        tables during their shutdown.
        Since table definition cache hold references to storage engine
        plugins we have to remove unused tables from it before shutting
        down plugins and keep number of these references minimal during
        the process (by immediately removing tables opened during this
        process from the table definition cache).
     @ sql/sql_base.cc
        Introduced table_def_start_shutdown() function which informs
        table definition cache that shutdown process has been started
        so it has to keep number of TABLE and TABLE_SHARE objects
        minimal in order to reduce number of references to pluggable
        engines.
        This allows to smoothly shutdown such plugins without completely
        prohibiting access to tables/table definition cache while
        shutting down other plugins.

    modified:
      sql/mysql_priv.h
      sql/mysqld.cc
      sql/sql_base.cc
=== modified file 'mysql-test/r/show_check.result'
--- a/mysql-test/r/show_check.result	2009-06-16 07:41:38 +0000
+++ b/mysql-test/r/show_check.result	2009-07-27 15:57:53 +0000
@@ -1442,3 +1442,5 @@ SHOW ENGINE MYISAM MUTEX;
 SHOW ENGINE MYISAM STATUS;
 DROP USER test_u@localhost;
 End of 5.1 tests
+SHOW VARIABLES LIKE 'deadlock%';
+Variable_name	Value

=== modified file 'mysql-test/t/show_check.test'
--- a/mysql-test/t/show_check.test	2009-06-24 19:39:33 +0000
+++ b/mysql-test/t/show_check.test	2009-07-27 15:57:53 +0000
@@ -1198,6 +1198,13 @@ DROP USER test_u@localhost;
 
 --echo End of 5.1 tests
 
+#
+# Maria removal: check that deadlock% variables are not present in the SHOW
+# VARIABLES output.
+#
+
+SHOW VARIABLES LIKE 'deadlock%';
+
 # Wait till all disconnects are completed
 --source include/wait_until_count_sessions.inc
 

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-07-24 20:28:43 +0000
+++ b/sql/mysqld.cc	2009-07-27 15:57:53 +0000
@@ -6055,26 +6055,6 @@ struct my_option my_long_options[] =
    NO_ARG, 0, 0, 0, 0, 0, 0},
   {"datadir", 'h', "Path to the database root.", (uchar**) &mysql_data_home,
    (uchar**) &mysql_data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"deadlock-search-depth-short", OPT_DEADLOCK_SEARCH_DEPTH_SHORT,
-   "Short search depth for the two-step deadlock detection",
-   (uchar**) &global_system_variables.wt_deadlock_search_depth_short,
-   (uchar**) &max_system_variables.wt_deadlock_search_depth_short,
-   0, GET_ULONG, REQUIRED_ARG, 4, 0, 32, 0, 0, 0},
-  {"deadlock-search-depth-long", OPT_DEADLOCK_SEARCH_DEPTH_LONG,
-   "Long search depth for the two-step deadlock detection",
-   (uchar**) &global_system_variables.wt_deadlock_search_depth_long,
-   (uchar**) &max_system_variables.wt_deadlock_search_depth_long,
-   0, GET_ULONG, REQUIRED_ARG, 15, 0, 33, 0, 0, 0},
-  {"deadlock-timeout-short", OPT_DEADLOCK_TIMEOUT_SHORT,
-   "Short timeout for the two-step deadlock detection (in microseconds)",
-   (uchar**) &global_system_variables.wt_timeout_short,
-   (uchar**) &max_system_variables.wt_timeout_short,
-   0, GET_ULONG, REQUIRED_ARG, 10000, 0, ULONG_MAX, 0, 0, 0},
-  {"deadlock-timeout-long", OPT_DEADLOCK_TIMEOUT_LONG,
-   "Long timeout for the two-step deadlock detection (in microseconds)",
-   (uchar**) &global_system_variables.wt_timeout_long,
-   (uchar**) &max_system_variables.wt_timeout_long,
-   0, GET_ULONG, REQUIRED_ARG, 50000000, 0, ULONG_MAX, 0, 0, 0},
 #ifndef DBUG_OFF
   {"debug", '#', "Debug log.", (uchar**) &default_dbug_option,
    (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2009-07-10 12:31:32 +0000
+++ b/sql/set_var.cc	2009-07-27 15:57:53 +0000
@@ -244,18 +244,6 @@ static sys_var_long_ptr	sys_connect_time
 					    &connect_timeout);
 static sys_var_const_os_str       sys_datadir(&vars, "datadir", mysql_real_data_home);
 static sys_var_backup_wait_timeout sys_backup_wait_timeout(&vars, "backup_wait_timeout");
-static sys_var_thd_ulong sys_deadlock_search_depth_short(&vars,
-                                "deadlock_search_depth_short",
-                                 &SV::wt_deadlock_search_depth_short);
-static sys_var_thd_ulong sys_deadlock_search_depth_long(&vars,
-                                "deadlock_search_depth_long",
-                                 &SV::wt_deadlock_search_depth_long);
-static sys_var_thd_ulong sys_deadlock_timeout_short(&vars,
-                                "deadlock_timeout_short",
-                                 &SV::wt_timeout_short);
-static sys_var_thd_ulong sys_deadlock_timeout_long(&vars,
-                                "deadlock_timeout_long",
-                                 &SV::wt_timeout_long);
 #ifndef DBUG_OFF
 static sys_var_thd_dbug        sys_dbug(&vars, "debug");
 #endif


Attachment: [text/bzr-bundle] bzr/alik@sun.com-20090727155753-zfiwg35yj8ft04s3.bundle
Thread
bzr push into mysql-5.4 branch (alik:2830 to 2831)Alexander Nozdrin27 Jul