summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorgbichot@quadita2.mysql.com <>2005-03-23 19:19:36 +0100
committergbichot@quadita2.mysql.com <>2005-03-23 19:19:36 +0100
commit19499229ed912dccdfe8eebe8ab1040804d9dd0d (patch)
treec57c0fd69a424b24d50306557552a989bad8cab2 /sql/sql_show.cc
parent2a53e9d9a6d0d7a2a80c74c5f5c1af7aa18ae39e (diff)
downloadmariadb-git-19499229ed912dccdfe8eebe8ab1040804d9dd0d.tar.gz
"After Monty's review" changes to the fix for BUG#8325 "Deadlock in replication thread stops replication":
s/sleep/safe_sleep (thread safe); sleep 0/1/2/3/4/5/5/5 (get slave less late); no message on error log (deadlock is too common sometimes), a global counter instead (SHOW STATUS LIKE 'slave_retried_transactions'). Plus a fix for libmysql/Makefile.shared
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 76ea72ef41c..f979b3ca771 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1887,6 +1887,19 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
pthread_mutex_unlock(&LOCK_active_mi);
break;
}
+ case SHOW_SLAVE_RETRIED_TRANS:
+ {
+ /*
+ TODO: in 5.1 with multimaster, have one such counter per line in SHOW
+ 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);
+ pthread_mutex_unlock(&LOCK_active_mi);
+ break;
+ }
#endif /* HAVE_REPLICATION */
case SHOW_OPENTABLES:
end= int10_to_str((long) cached_tables(), buff, 10);