List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:December 21 2010 10:36am
Subject:Re: bzr commit into mysql-trunk-bugfixing branch
(alfranio.correia:3446) Bug#58986
View as plain text  
Nice work, patch approved!

Alfranio Correia wrote:
> #At
> file:///home/acorreia/workspace.oracle/repository.mysql/bzrwork/bug-davi/mysql-trunk-bugfixing/
> based on revid:sergey.vojtovich@stripped
> 
>  3446 Alfranio Correia	2010-12-21
>       BUG#58986 trunk does not build without performance schema
>       
>       Safeguarded the code that references the performance schema with
>         #ifdef HAVE_PSI_INTERFACE 
> 
>     modified:
>       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
> === modified file 'sql/rpl_info.cc'
> --- a/sql/rpl_info.cc	2010-07-27 19:26:54 +0000
> +++ b/sql/rpl_info.cc	2010-12-21 09:33:41 +0000
> @@ -17,28 +17,42 @@
>  #include <sql_priv.h>
>  #include "rpl_info.h"
>  
> -Rpl_info::Rpl_info(const char* type,
> -                   PSI_mutex_key *param_key_info_run_lock,
> +Rpl_info::Rpl_info(const char* type
> +#ifdef HAVE_PSI_INTERFACE
> +                   ,PSI_mutex_key *param_key_info_run_lock,
>                     PSI_mutex_key *param_key_info_data_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)
> +                   PSI_mutex_key *param_key_info_stop_cond
> +#endif
> +                 )
>    :Slave_reporting_capability(type),
> +#ifdef HAVE_PSI_INTERFACE
>    key_info_run_lock(param_key_info_run_lock),
>    key_info_data_lock(param_key_info_data_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),
> +#endif
>    info_thd(0), inited(0), abort_slave(0),
>    slave_running(0), slave_run_id(0),
>    handler(0)
>  {
> -  mysql_mutex_init(*key_info_run_lock, &run_lock, MY_MUTEX_INIT_FAST);
> +#ifdef HAVE_PSI_INTERFACE
> +  mysql_mutex_init(*key_info_run_lock,
> +                    &run_lock, MY_MUTEX_INIT_FAST);
>    mysql_mutex_init(*key_info_data_lock,
>                     &data_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);
>    mysql_cond_init(*key_info_stop_cond, &stop_cond, NULL);
> +#else
> +  mysql_mutex_init(NULL, &run_lock, MY_MUTEX_INIT_FAST);
> +  mysql_mutex_init(NULL, &data_lock, MY_MUTEX_INIT_FAST);
> +  mysql_cond_init(NULL, &data_cond, NULL);
> +  mysql_cond_init(NULL, &start_cond, NULL);
> +  mysql_cond_init(NULL, &stop_cond, NULL);
> +#endif
>  }
>  
>  Rpl_info::~Rpl_info()
> 
> === modified file 'sql/rpl_info.h'
> --- a/sql/rpl_info.h	2010-10-25 10:39:01 +0000
> +++ b/sql/rpl_info.h	2010-12-21 09:33:41 +0000
> @@ -34,11 +34,13 @@ public:
>      stop_cond - when stopped
>      data_cond - when data protected by data_lock changes
>    */
> -  mysql_cond_t data_cond,start_cond,stop_cond;
> +  mysql_cond_t data_cond,start_cond, stop_cond;
>  
> +#ifdef HAVE_PSI_INTERFACE
>    PSI_mutex_key *key_info_run_lock, *key_info_data_lock;
>  
>    PSI_mutex_key *key_info_data_cond, *key_info_start_cond, *key_info_stop_cond;
> +#endif
>  
>    THD *info_thd;
>  
> @@ -51,12 +53,15 @@ public:
>    int events_until_exit;
>  #endif
>  
> -  Rpl_info(const char* type,
> -           PSI_mutex_key *param_key_info_run_lock,
> +  Rpl_info(const char* type
> +#ifdef HAVE_PSI_INTERFACE
> +           ,PSI_mutex_key *param_key_info_run_lock,
>             PSI_mutex_key *param_key_info_data_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);
> +           PSI_mutex_key *param_key_info_stop_cond
> +#endif
> +          );
>    virtual ~Rpl_info();
>  
>    int check_info()
> 
> === modified file 'sql/rpl_info_factory.cc'
> --- a/sql/rpl_info_factory.cc	2010-10-29 18:16:48 +0000
> +++ b/sql/rpl_info_factory.cc	2010-12-21 09:33:41 +0000
> @@ -87,11 +87,15 @@ Master_info *Rpl_info_factory::create_mi
>  
>    DBUG_ENTER("Rpl_info_factory::Rpl_info_factory");
>  
> -  if (!(mi= new Master_info(&key_master_info_run_lock,
> +  if (!(mi= new Master_info(
> +#ifdef HAVE_PSI_INTERFACE
> +                            &key_master_info_run_lock,
>                              &key_master_info_data_lock,
>                              &key_master_info_data_cond,
>                              &key_master_info_start_cond,
> -                            &key_master_info_stop_cond)))
> +                            &key_master_info_stop_cond
> +#endif
> +                           )))
>      goto err;
>  
>    /*
> @@ -163,12 +167,15 @@ Relay_log_info *Rpl_info_factory::create
>  
>    DBUG_ENTER("Rpl_info_factory::create_rli");
>  
> -  if (!(rli= new Relay_log_info(is_slave_recovery,
> -                                &key_relay_log_info_run_lock,
> +  if (!(rli= new Relay_log_info(is_slave_recovery
> +#ifdef HAVE_PSI_INTERFACE
> +                                ,&key_relay_log_info_run_lock,
>                                  &key_relay_log_info_data_lock,
>                                  &key_relay_log_info_data_cond,
>                                  &key_relay_log_info_start_cond,
> -                                &key_relay_log_info_stop_cond)))
> +                                &key_relay_log_info_stop_cond
> +#endif
> +                               )))
>      goto err;
>  
>    /*
> 
> === modified file 'sql/rpl_mi.cc'
> --- a/sql/rpl_mi.cc	2010-11-29 18:35:56 +0000
> +++ b/sql/rpl_mi.cc	2010-12-21 09:33:41 +0000
> @@ -76,14 +76,22 @@ const char *info_mi_fields []=
>    "retry_count"
>  };
>  
> -Master_info::Master_info(PSI_mutex_key *param_key_info_run_lock,
> +Master_info::Master_info(
> +#ifdef HAVE_PSI_INTERFACE
> +                         PSI_mutex_key *param_key_info_run_lock,
>                           PSI_mutex_key *param_key_info_data_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)
> -   :Rpl_info("I/O", param_key_info_run_lock, param_key_info_data_lock,
> +                         PSI_mutex_key *param_key_info_stop_cond
> +#endif
> +                        )
> +   :Rpl_info("I/O"
> +#ifdef HAVE_PSI_INTERFACE
> +             ,param_key_info_run_lock, param_key_info_data_lock,
>               param_key_info_data_cond, param_key_info_start_cond,
> -             param_key_info_stop_cond),
> +             param_key_info_stop_cond
> +#endif
> +            ),
>     ssl(0), ssl_verify_server_cert(0),
>     port(MYSQL_PORT), connect_retry(DEFAULT_CONNECT_RETRY),
>     clock_diff_with_master(0), heartbeat_period(0),
> 
> === modified file 'sql/rpl_mi.h'
> --- a/sql/rpl_mi.h	2010-11-29 18:35:56 +0000
> +++ b/sql/rpl_mi.h	2010-12-21 09:33:41 +0000
> @@ -63,11 +63,15 @@ typedef struct st_mysql MYSQL;
>  class Master_info : public Rpl_info
>  {
>   public:
> -  Master_info(PSI_mutex_key *param_key_info_run_lock,
> +  Master_info(
> +#ifdef HAVE_PSI_INTERFACE
> +              PSI_mutex_key *param_key_info_run_lock,
>                PSI_mutex_key *param_key_info_data_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);
> +              PSI_mutex_key *param_key_info_stop_cond
> +#endif
> +             );
>    virtual ~Master_info();
>  
>    /* the variables below are needed because we can change masters on the fly */
> 
> === modified file 'sql/rpl_rli.cc'
> --- a/sql/rpl_rli.cc	2010-11-29 11:28:55 +0000
> +++ b/sql/rpl_rli.cc	2010-12-21 09:33:41 +0000
> @@ -45,15 +45,22 @@ const char* info_rli_fields[]=
>  
>  const char *const Relay_log_info::state_delaying_string = "Waiting until
> MASTER_DELAY seconds after master executed event";
>  
> -Relay_log_info::Relay_log_info(bool is_slave_recovery,
> -                               PSI_mutex_key *param_key_info_run_lock,
> +Relay_log_info::Relay_log_info(bool is_slave_recovery
> +#ifdef HAVE_PSI_INTERFACE
> +                               ,PSI_mutex_key *param_key_info_run_lock,
>                                 PSI_mutex_key *param_key_info_data_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)
> -   :Rpl_info("SQL", param_key_info_run_lock, param_key_info_data_lock,
> +                               PSI_mutex_key *param_key_info_stop_cond
> +#endif
> +                              )
> +   :Rpl_info("SQL"
> +#ifdef HAVE_PSI_INTERFACE
> +             ,param_key_info_run_lock, param_key_info_data_lock,
>               param_key_info_data_cond, param_key_info_start_cond,
> -             param_key_info_stop_cond),
> +             param_key_info_stop_cond
> +#endif
> +            ),
>     replicate_same_server_id(::replicate_same_server_id),
>     cur_log_fd(-1), relay_log(&sync_relaylog_period),
>     is_relay_log_recovery(is_slave_recovery),
> 
> === modified file 'sql/rpl_rli.h'
> --- a/sql/rpl_rli.h	2010-11-15 16:43:41 +0000
> +++ b/sql/rpl_rli.h	2010-12-21 09:33:41 +0000
> @@ -328,12 +328,15 @@ public:
>    char slave_patternload_file[FN_REFLEN]; 
>    size_t slave_patternload_file_size;  
>  
> -  Relay_log_info(bool is_slave_recovery,
> -                 PSI_mutex_key *param_key_info_run_lock,
> +  Relay_log_info(bool is_slave_recovery
> +#ifdef HAVE_PSI_INTERFACE
> +                 ,PSI_mutex_key *param_key_info_run_lock,
>                   PSI_mutex_key *param_key_info_data_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);
> +                 PSI_mutex_key *param_key_info_stop_cond
> +#endif
> +                );
>    virtual ~Relay_log_info();
>  
>    /**
> 
> text/bzr-bundle 类型 附件
> (bzr/alfranio.correia@stripped)
> # Bazaar merge directive format 2 (Bazaar 0.90)
> # revision_id: alfranio.correia@stripped\
> #   m0ibayayfdcrud2p
> # target_branch: file:///home/acorreia/workspace.oracle\
> #   /repository.mysql/bzrwork/bug-davi/mysql-trunk-bugfixing/
> # testament_sha1: 2cceba033011dd3b9829b5f3d6e5b05696d5b71c
> # timestamp: 2010-12-21 09:47:00 +0000
> # base_revision_id: sergey.vojtovich@stripped\
> #   c2sx7tw4rrd3f4lh
> # 
> # Begin bundle
> IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWUw6DEoABh5/gAH2xtx5d///
> e+f/YL////BgCs759bnXNAAAAjVe7WmgpQlFEqpBiSFMmTTE0Hom0jIyHqNAyZANGQ0AaBpoCUiK
> GmZTamjABMQZGA0ACZGmINAyaMQ4yYJoZDIyMmhoA0GRhANBo0yGIaAETaU1Mp6EYBNNNMmjABDQ
> aNGBMTCYAAEUo0qfk0aAJiYJlPTIp41Q09JoADQ0BkDR6nqCSQEaACaJtQJlT8npCmajIeoaA0aa
> AAZMSaCOuuNbXrurR1Ikt7udGXODgHJJ8ov+2LDijlbffALO7M6nAUCBGYIAzdoj8BgEEQdJZEUT
> 1TtYxwWCR6SiBD0Pd9r3Dis2NWZp8mh+F72jhHcY70kh22JJNptOhU+EIDIfZPeNdpSFRVXClLEk
> tWQCHiAYYGMqZSzADjXOtpYYgIgiEiEiCIGIOf9hZXZS+pqZmryU4vqG0e4i+uIgaRVUqqtGT2cy
> H0HANlYJYDBky0FmTaw2S2TQggaNTLYcG2bSBQQkJp4iizgTQL2RizKcaS92JWi8KfwGJhJ5Bjxy
> w8TKlJgAwcwJaTBPuCc9VHZhhpU6K04k+0mpY1RYQSVVdsljZgs3XcehSrGTIB6d6jre81ejzSeD
> BBtFAMro2uBWrmo4XbtocXnbuNshKyIZwB3wZaKQfIRsJhtvhpj8LiXvNGOh6Awwwx9QJfF5ET5E
> pmEF5n3+/0KxBG33C9wHy4pSuqPxzh8fnU5DhxdkCT0kSiEg72h1L6qZ6V91bnmuVCzwuGAZQvvw
> hKL88RPel8gDRcIBwJR2JPI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6kJ0SWEKgNhXIq0
> rB5wyjEK5DHsrW3BR1nMtGFWUGIqXo2sNJA2ChOIabAFWn+KyeAnE4AjDpICAo9BhdMi1DFyXBLe
> WP4vysMwzHrGYZhmOOfBWgLjqZP7hBag9wxdKGgaZjg6eWAk00OnMS3aAkYpgLFkNIky4laD0evl
> WyXFmZmZqJeoCou95uO28oisEPzyE6o1Pkz5CrPLINnaT6idecWdKnuOklzyGtW+K343PTVpUwuy
> PQsEjA7k33k1ltT0FviuZEkZmSaDs6KxDIY2DjfkrE9leLpVrWo5Hn4jqL5ncjWO0T4fKcHQSKjY
> 3tExzk+YsLuVtK8csGmdXoKajdQBMhk1pzHpBETAwIO0oRNwPeVS3JATq/+LuSKcKEgmHQYlAA==
> 
> 


Thread
bzr commit into mysql-trunk-bugfixing branch (alfranio.correia:3446)Bug#58986Alfranio Correia21 Dec
  • Re: bzr commit into mysql-trunk-bugfixing branch(alfranio.correia:3446) Bug#58986He Zhenxing21 Dec