diff options
author | unknown <sven@riska.(none)> | 2008-02-06 21:07:45 +0100 |
---|---|---|
committer | unknown <sven@riska.(none)> | 2008-02-06 21:07:45 +0100 |
commit | ea7ecda29b0d8e542e8d309acf500c05f29a5445 (patch) | |
tree | c162802fdefcbba8c3d7286abc5376f120a06b74 /sql/slave.cc | |
parent | 781de1968802032b600704112a8b3fa7fa64d0a7 (diff) | |
parent | 7b82376f0a27228705aa0f4e988a7f881aea555c (diff) | |
download | mariadb-git-ea7ecda29b0d8e542e8d309acf500c05f29a5445.tar.gz |
Merge riska.(none):/home/sven/bk/b34355-backslash_in_path_name_under_win/5.0-rpl
into riska.(none):/home/sven/bk/b34355-backslash_in_path_name_under_win/5.1-new-rpl
client/mysqlbinlog.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 4ffc2023e85..4ba18428751 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1337,14 +1337,15 @@ bool show_master_info(THD* thd, Master_info* mi) protocol->prepare_for_resend(); /* - TODO: we read slave_running without run_lock, whereas these variables - are updated under run_lock and not data_lock. In 5.0 we should lock - run_lock on top of data_lock (with good order). + slave_running can be accessed without run_lock but not other + non-volotile members like mi->io_thd, which is guarded by the mutex. */ + pthread_mutex_lock(&mi->run_lock); + protocol->store(mi->io_thd ? mi->io_thd->proc_info : "", &my_charset_bin); + pthread_mutex_unlock(&mi->run_lock); + pthread_mutex_lock(&mi->data_lock); pthread_mutex_lock(&mi->rli.data_lock); - - protocol->store(mi->io_thd ? mi->io_thd->proc_info : "", &my_charset_bin); protocol->store(mi->host, &my_charset_bin); protocol->store(mi->user, &my_charset_bin); protocol->store((uint32) mi->port); |