1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind

This is a backport of BUG#43076.
This commit is contained in:
Alfranio Correia
2009-06-16 16:04:30 +01:00
parent 81b5a391b0
commit 376a73c079
3 changed files with 21 additions and 0 deletions

View File

@@ -16,6 +16,8 @@
class Slave_reporting_capability
{
public:
/** lock used to synchronize m_last_error on 'SHOW SLAVE STATUS' **/
mutable pthread_mutex_t err_lock;
/**
Constructor.
@@ -24,6 +26,7 @@ public:
Slave_reporting_capability(char const *thread_name)
: m_thread_name(thread_name)
{
pthread_mutex_init(&err_lock, MY_MUTEX_INIT_FAST);
}
/**
@@ -44,7 +47,9 @@ public:
STATUS</code>.
*/
void clear_error() {
pthread_mutex_lock(&err_lock);
m_last_error.clear();
pthread_mutex_unlock(&err_lock);
}
/**
@@ -72,6 +77,7 @@ public:
Error const& last_error() const { return m_last_error; }
virtual ~Slave_reporting_capability()= 0;
private:
/**
Last error produced by the I/O or SQL thread respectively.
@@ -79,6 +85,10 @@ private:
mutable Error m_last_error;
char const *const m_thread_name;
// not implemented
Slave_reporting_capability(const Slave_reporting_capability& rhs);
Slave_reporting_capability& operator=(const Slave_reporting_capability& rhs);
};
#endif // RPL_REPORTING_H