Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2464 05/11/01 11:48:55 jimw@stripped +1 -0
Avoid possible race condition in accessing slave statistics
during shutdown. (Bug #11796)
sql/sql_show.cc
1.206 05/11/01 11:48:53 jimw@stripped +7 -4
Check that active_mi is not NULL before accessing its members.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-4.1-11796
--- 1.205/sql/sql_show.cc 2005-10-03 11:48:48 -07:00
+++ 1.206/sql/sql_show.cc 2005-11-01 11:48:53 -08:00
@@ -1890,7 +1890,7 @@
case SHOW_SLAVE_RUNNING:
{
pthread_mutex_lock(&LOCK_active_mi);
- end= strmov(buff, (active_mi->slave_running &&
+ end= strmov(buff, (active_mi && active_mi->slave_running &&
active_mi->rli.slave_running) ? "ON" : "OFF");
pthread_mutex_unlock(&LOCK_active_mi);
break;
@@ -1902,9 +1902,12 @@
SLAVE STATUS, and have the sum over all lines here.
*/
pthread_mutex_lock(&LOCK_active_mi);
- pthread_mutex_lock(&active_mi->rli.data_lock);
- end= int10_to_str(active_mi->rli.retried_trans, buff, 10);
- pthread_mutex_unlock(&active_mi->rli.data_lock);
+ if (active_mi)
+ {
+ pthread_mutex_lock(&active_mi->rli.data_lock);
+ end= int10_to_str(active_mi->rli.retried_trans, buff, 10);
+ pthread_mutex_unlock(&active_mi->rli.data_lock);
+ }
pthread_mutex_unlock(&LOCK_active_mi);
break;
}
| Thread |
|---|
| • bk commit into 4.1 tree (jimw:1.2464) BUG#11796 | Jim Winstead | 1 Nov |