List:Commits« Previous MessageNext Message »
From:Nuno Carvalho Date:September 20 2012 5:55pm
Subject:bzr push into mysql-trunk-wl6402 branch (nuno.carvalho:4439 to 4441) WL#6402
View as plain text  
 4441 Nuno Carvalho	2012-09-20
      WL#6402: Non blocking show slave status
      
      Updated lock acquisition order on rpl_info.h.

    modified:
      sql/rpl_info.h
 4440 Nuno Carvalho	2012-09-20
      WL#6402: Non blocking show slave status
        
      Reverted param_key_info_thd_lock renaming.

    modified:
      sql/mysqld.cc
      sql/mysqld.h
      sql/rpl_info.cc
      sql/rpl_info.h
      sql/rpl_info_factory.cc
      sql/rpl_mi.cc
      sql/rpl_mi.h
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_rli_pdb.cc
      sql/rpl_rli_pdb.h
 4439 Nuno Carvalho	2012-09-19
      WL#6402: Non blocking show slave status
        
      Missed some renaming on previous commit.

    modified:
      sql/mysqld.cc
      sql/mysqld.h
      sql/rpl_info_factory.cc
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	revid:nuno.carvalho@stripped
+++ b/sql/mysqld.cc	revid:nuno.carvalho@stripped
@@ -9009,9 +9009,9 @@ PSI_mutex_key
   key_LOCK_system_variables_hash, key_LOCK_table_share, key_LOCK_thd_data,
   key_LOCK_user_conn, key_LOCK_uuid_generator, key_LOG_LOCK_log,
   key_master_info_data_lock, key_master_info_run_lock,
-  key_master_info_sleep_lock, key_master_info_info_thd_lock,
+  key_master_info_sleep_lock, key_master_info_thd_lock,
   key_mutex_slave_reporting_capability_err_lock, key_relay_log_info_data_lock,
-  key_relay_log_info_sleep_lock, key_relay_log_info_info_thd_lock,
+  key_relay_log_info_sleep_lock, key_relay_log_info_thd_lock,
   key_relay_log_info_log_space_lock, key_relay_log_info_run_lock,
   key_mutex_slave_parallel_pend_jobs, key_mutex_mts_temp_tables_lock,
   key_mutex_slave_parallel_worker,
@@ -9082,11 +9082,11 @@ static PSI_mutex_info all_server_mutexes
   { &key_master_info_data_lock, "Master_info::data_lock", 0},
   { &key_master_info_run_lock, "Master_info::run_lock", 0},
   { &key_master_info_sleep_lock, "Master_info::sleep_lock", 0},
-  { &key_master_info_info_thd_lock, "Master_info::info_thd_lock", 0},
+  { &key_master_info_thd_lock, "Master_info::info_thd_lock", 0},
   { &key_mutex_slave_reporting_capability_err_lock, "Slave_reporting_capability::err_lock", 0},
   { &key_relay_log_info_data_lock, "Relay_log_info::data_lock", 0},
   { &key_relay_log_info_sleep_lock, "Relay_log_info::sleep_lock", 0},
-  { &key_relay_log_info_info_thd_lock, "Relay_log_info::info_thd_lock", 0},
+  { &key_relay_log_info_thd_lock, "Relay_log_info::info_thd_lock", 0},
   { &key_relay_log_info_log_space_lock, "Relay_log_info::log_space_lock", 0},
   { &key_relay_log_info_run_lock, "Relay_log_info::run_lock", 0},
   { &key_mutex_slave_parallel_pend_jobs, "Relay_log_info::pending_jobs_lock", 0},

=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h	revid:nuno.carvalho@stripped
+++ b/sql/mysqld.h	revid:nuno.carvalho@stripped
@@ -316,9 +316,9 @@ extern PSI_mutex_key
   key_LOCK_table_share, key_LOCK_thd_data,
   key_LOCK_user_conn, key_LOCK_uuid_generator, key_LOG_LOCK_log,
   key_master_info_data_lock, key_master_info_run_lock,
-  key_master_info_sleep_lock, key_master_info_info_thd_lock,
+  key_master_info_sleep_lock, key_master_info_thd_lock,
   key_mutex_slave_reporting_capability_err_lock, key_relay_log_info_data_lock,
-  key_relay_log_info_sleep_lock, key_relay_log_info_info_thd_lock,
+  key_relay_log_info_sleep_lock, key_relay_log_info_thd_lock,
   key_relay_log_info_log_space_lock, key_relay_log_info_run_lock,
   key_mutex_slave_parallel_pend_jobs, key_mutex_mts_temp_tables_lock,
   key_mutex_slave_parallel_worker,

=== modified file 'sql/rpl_info.cc'
--- a/sql/rpl_info.cc	revid:nuno.carvalho@stripped
+++ b/sql/rpl_info.cc	revid:nuno.carvalho@stripped
@@ -22,7 +22,7 @@ Rpl_info::Rpl_info(const char* type
                    ,PSI_mutex_key *param_key_info_run_lock,
                    PSI_mutex_key *param_key_info_data_lock,
                    PSI_mutex_key *param_key_info_sleep_lock,
-                   PSI_mutex_key *param_key_info_info_thd_lock,
+                   PSI_mutex_key *param_key_info_thd_lock,
                    PSI_mutex_key *param_key_info_data_cond,
                    PSI_mutex_key *param_key_info_start_cond,
                    PSI_mutex_key *param_key_info_stop_cond,
@@ -35,7 +35,7 @@ Rpl_info::Rpl_info(const char* type
   key_info_run_lock(param_key_info_run_lock),
   key_info_data_lock(param_key_info_data_lock),
   key_info_sleep_lock(param_key_info_sleep_lock),
-  key_info_info_thd_lock(param_key_info_info_thd_lock),
+  key_info_thd_lock(param_key_info_thd_lock),
   key_info_data_cond(param_key_info_data_cond),
   key_info_start_cond(param_key_info_start_cond),
   key_info_stop_cond(param_key_info_stop_cond),
@@ -52,7 +52,7 @@ Rpl_info::Rpl_info(const char* type
                    &data_lock, MY_MUTEX_INIT_FAST);
   mysql_mutex_init(*key_info_sleep_lock,
                     &sleep_lock, MY_MUTEX_INIT_FAST);
-  mysql_mutex_init(*key_info_info_thd_lock,
+  mysql_mutex_init(*key_info_thd_lock,
                     &info_thd_lock, MY_MUTEX_INIT_FAST);
   mysql_cond_init(*key_info_data_cond, &data_cond, NULL);
   mysql_cond_init(*key_info_start_cond, &start_cond, NULL);

=== modified file 'sql/rpl_info.h'
--- a/sql/rpl_info.h	revid:nuno.carvalho@stripped
+++ b/sql/rpl_info.h	revid:nuno.carvalho@stripped
@@ -30,11 +30,12 @@ public:
     standard lock acquisition order to avoid deadlocks:
     run_lock, data_lock, relay_log.LOCK_log, relay_log.LOCK_index
     run_lock, sleep_lock
+    run_lock, info_thd_lock
 
     info_thd_lock is to protect operations on info_thd:
     - before *reading* info_thd we must hold *either* info_thd_lock or
       run_lock;
-    - before *writing* we must hold *both* info_thd_lock and run_lock.
+    - before *writing* we must hold *both* run_lock and info_thd_lock.
   */
   mysql_mutex_t data_lock, run_lock, sleep_lock, info_thd_lock;
   /*
@@ -47,7 +48,7 @@ public:
 
 #ifdef HAVE_PSI_INTERFACE
   PSI_mutex_key *key_info_run_lock, *key_info_data_lock, *key_info_sleep_lock,
-                *key_info_info_thd_lock;
+                *key_info_thd_lock;
 
   PSI_mutex_key *key_info_data_cond, *key_info_start_cond, *key_info_stop_cond,
                 *key_info_sleep_cond;
@@ -146,7 +147,7 @@ protected:
            ,PSI_mutex_key *param_key_info_run_lock,
            PSI_mutex_key *param_key_info_data_lock,
            PSI_mutex_key *param_key_info_sleep_lock,
-           PSI_mutex_key *param_key_info_info_thd_lock,
+           PSI_mutex_key *param_key_info_thd_lock,
            PSI_mutex_key *param_key_info_data_cond,
            PSI_mutex_key *param_key_info_start_cond,
            PSI_mutex_key *param_key_info_stop_cond,

=== modified file 'sql/rpl_info_factory.cc'
--- a/sql/rpl_info_factory.cc	revid:nuno.carvalho@stripped
+++ b/sql/rpl_info_factory.cc	revid:nuno.carvalho@stripped
@@ -99,7 +99,7 @@ Master_info *Rpl_info_factory::create_mi
                             &key_master_info_run_lock,
                             &key_master_info_data_lock,
                             &key_master_info_sleep_lock,
-                            &key_master_info_info_thd_lock,
+                            &key_master_info_thd_lock,
                             &key_master_info_data_cond,
                             &key_master_info_start_cond,
                             &key_master_info_stop_cond,
@@ -218,7 +218,7 @@ Relay_log_info *Rpl_info_factory::create
                                 ,&key_relay_log_info_run_lock,
                                 &key_relay_log_info_data_lock,
                                 &key_relay_log_info_sleep_lock,
-                                &key_relay_log_info_info_thd_lock,
+                                &key_relay_log_info_thd_lock,
                                 &key_relay_log_info_data_cond,
                                 &key_relay_log_info_start_cond,
                                 &key_relay_log_info_stop_cond,
@@ -384,7 +384,7 @@ Slave_worker *Rpl_info_factory::create_w
                                  ,&key_relay_log_info_run_lock,
                                  &key_relay_log_info_data_lock,
                                  &key_relay_log_info_sleep_lock,
-                                 &key_relay_log_info_info_thd_lock,
+                                 &key_relay_log_info_thd_lock,
                                  &key_relay_log_info_data_cond,
                                  &key_relay_log_info_start_cond,
                                  &key_relay_log_info_stop_cond,

=== modified file 'sql/rpl_mi.cc'
--- a/sql/rpl_mi.cc	revid:nuno.carvalho@stripped
+++ b/sql/rpl_mi.cc	revid:nuno.carvalho@stripped
@@ -96,7 +96,7 @@ Master_info::Master_info(
                          PSI_mutex_key *param_key_info_run_lock,
                          PSI_mutex_key *param_key_info_data_lock,
                          PSI_mutex_key *param_key_info_sleep_lock,
-                         PSI_mutex_key *param_key_info_info_thd_lock,
+                         PSI_mutex_key *param_key_info_thd_lock,
                          PSI_mutex_key *param_key_info_data_cond,
                          PSI_mutex_key *param_key_info_start_cond,
                          PSI_mutex_key *param_key_info_stop_cond,
@@ -107,7 +107,7 @@ Master_info::Master_info(
    :Rpl_info("I/O"
 #ifdef HAVE_PSI_INTERFACE
              ,param_key_info_run_lock, param_key_info_data_lock,
-             param_key_info_sleep_lock, param_key_info_info_thd_lock,
+             param_key_info_sleep_lock, param_key_info_thd_lock,
              param_key_info_data_cond, param_key_info_start_cond,
              param_key_info_stop_cond, param_key_info_sleep_cond
 #endif

=== modified file 'sql/rpl_mi.h'
--- a/sql/rpl_mi.h	revid:nuno.carvalho@stripped
+++ b/sql/rpl_mi.h	revid:nuno.carvalho@stripped
@@ -370,7 +370,7 @@ private:
               PSI_mutex_key *param_key_info_run_lock,
               PSI_mutex_key *param_key_info_data_lock,
               PSI_mutex_key *param_key_info_sleep_lock,
-              PSI_mutex_key *param_key_info_info_thd_lock,
+              PSI_mutex_key *param_key_info_thd_lock,
               PSI_mutex_key *param_key_info_data_cond,
               PSI_mutex_key *param_key_info_start_cond,
               PSI_mutex_key *param_key_info_stop_cond,

=== modified file 'sql/rpl_rli.cc'
--- a/sql/rpl_rli.cc	revid:nuno.carvalho@stripped
+++ b/sql/rpl_rli.cc	revid:nuno.carvalho@stripped
@@ -56,7 +56,7 @@ Relay_log_info::Relay_log_info(bool is_s
                                ,PSI_mutex_key *param_key_info_run_lock,
                                PSI_mutex_key *param_key_info_data_lock,
                                PSI_mutex_key *param_key_info_sleep_lock,
-                               PSI_mutex_key *param_key_info_info_thd_lock,
+                               PSI_mutex_key *param_key_info_thd_lock,
                                PSI_mutex_key *param_key_info_data_cond,
                                PSI_mutex_key *param_key_info_start_cond,
                                PSI_mutex_key *param_key_info_stop_cond,
@@ -67,7 +67,7 @@ Relay_log_info::Relay_log_info(bool is_s
    :Rpl_info("SQL"
 #ifdef HAVE_PSI_INTERFACE
              ,param_key_info_run_lock, param_key_info_data_lock,
-             param_key_info_sleep_lock, param_key_info_info_thd_lock,
+             param_key_info_sleep_lock, param_key_info_thd_lock,
              param_key_info_data_cond, param_key_info_start_cond,
              param_key_info_stop_cond, param_key_info_sleep_cond
 #endif

=== modified file 'sql/rpl_rli.h'
--- a/sql/rpl_rli.h	revid:nuno.carvalho@stripped
+++ b/sql/rpl_rli.h	revid:nuno.carvalho@stripped
@@ -834,7 +834,7 @@ public:
                  ,PSI_mutex_key *param_key_info_run_lock,
                  PSI_mutex_key *param_key_info_data_lock,
                  PSI_mutex_key *param_key_info_sleep_lock,
-                 PSI_mutex_key *param_key_info_info_thd_lock,
+                 PSI_mutex_key *param_key_info_thd_lock,
                  PSI_mutex_key *param_key_info_data_cond,
                  PSI_mutex_key *param_key_info_start_cond,
                  PSI_mutex_key *param_key_info_stop_cond,

=== modified file 'sql/rpl_rli_pdb.cc'
--- a/sql/rpl_rli_pdb.cc	revid:nuno.carvalho@stripped
+++ b/sql/rpl_rli_pdb.cc	revid:nuno.carvalho@stripped
@@ -69,7 +69,7 @@ Slave_worker::Slave_worker(Relay_log_inf
                            ,PSI_mutex_key *param_key_info_run_lock,
                            PSI_mutex_key *param_key_info_data_lock,
                            PSI_mutex_key *param_key_info_sleep_lock,
-                           PSI_mutex_key *param_key_info_info_thd_lock,
+                           PSI_mutex_key *param_key_info_thd_lock,
                            PSI_mutex_key *param_key_info_data_cond,
                            PSI_mutex_key *param_key_info_start_cond,
                            PSI_mutex_key *param_key_info_stop_cond,
@@ -80,7 +80,7 @@ Slave_worker::Slave_worker(Relay_log_inf
   : Relay_log_info(FALSE
 #ifdef HAVE_PSI_INTERFACE
                    ,param_key_info_run_lock, param_key_info_data_lock,
-                   param_key_info_sleep_lock, param_key_info_info_thd_lock,
+                   param_key_info_sleep_lock, param_key_info_thd_lock,
                    param_key_info_data_cond, param_key_info_start_cond,
                    param_key_info_stop_cond, param_key_info_sleep_cond
 #endif

=== modified file 'sql/rpl_rli_pdb.h'
--- a/sql/rpl_rli_pdb.h	revid:nuno.carvalho@stripped
+++ b/sql/rpl_rli_pdb.h	revid:nuno.carvalho@stripped
@@ -287,7 +287,7 @@ public:
                ,PSI_mutex_key *param_key_info_run_lock,
                PSI_mutex_key *param_key_info_data_lock,
                PSI_mutex_key *param_key_info_sleep_lock,
-               PSI_mutex_key *param_key_info_info_thd_lock,
+               PSI_mutex_key *param_key_info_thd_lock,
                PSI_mutex_key *param_key_info_data_cond,
                PSI_mutex_key *param_key_info_start_cond,
                PSI_mutex_key *param_key_info_stop_cond,

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl6402 branch (nuno.carvalho:4439 to 4441) WL#6402Nuno Carvalho21 Sep