Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4cb4593b
Commit
4cb4593b
authored
Jun 16, 2009
by
Alfranio Correia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind
This is a backport of BUG#43076.
parent
37a5f2d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
sql/rpl_reporting.cc
sql/rpl_reporting.cc
+7
-0
sql/rpl_reporting.h
sql/rpl_reporting.h
+10
-0
sql/slave.cc
sql/slave.cc
+4
-0
No files found.
sql/rpl_reporting.cc
View file @
4cb4593b
...
...
@@ -13,6 +13,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
va_list
args
;
va_start
(
args
,
msg
);
pthread_mutex_lock
(
&
err_lock
);
switch
(
level
)
{
case
ERROR_LEVEL
:
...
...
@@ -38,6 +39,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
my_vsnprintf
(
pbuff
,
pbuffsize
,
msg
,
args
);
pthread_mutex_unlock
(
&
err_lock
);
va_end
(
args
);
/* If the msg string ends with '.', do not add a ',' it would be ugly */
...
...
@@ -46,3 +48,8 @@ Slave_reporting_capability::report(loglevel level, int err_code,
(
pbuff
[
0
]
&&
*
(
strend
(
pbuff
)
-
1
)
==
'.'
)
?
""
:
","
,
err_code
);
}
Slave_reporting_capability
::~
Slave_reporting_capability
()
{
pthread_mutex_destroy
(
&
err_lock
);
}
sql/rpl_reporting.h
View file @
4cb4593b
...
...
@@ -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 @@ class Slave_reporting_capability
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 @@ class Slave_reporting_capability
STATUS</code>.
*/
void
clear_error
()
{
pthread_mutex_lock
(
&
err_lock
);
m_last_error
.
clear
();
pthread_mutex_unlock
(
&
err_lock
);
}
/**
...
...
@@ -72,6 +77,7 @@ class Slave_reporting_capability
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 @@ class Slave_reporting_capability
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
...
...
sql/slave.cc
View file @
4cb4593b
...
...
@@ -1493,6 +1493,8 @@ bool show_master_info(THD* thd, Master_info* mi)
pthread_mutex_lock
(
&
mi
->
data_lock
);
pthread_mutex_lock
(
&
mi
->
rli
.
data_lock
);
pthread_mutex_lock
(
&
mi
->
err_lock
);
pthread_mutex_lock
(
&
mi
->
rli
.
err_lock
);
protocol
->
store
(
mi
->
host
,
&
my_charset_bin
);
protocol
->
store
(
mi
->
user
,
&
my_charset_bin
);
protocol
->
store
((
uint32
)
mi
->
port
);
...
...
@@ -1592,6 +1594,8 @@ bool show_master_info(THD* thd, Master_info* mi)
// Last_SQL_Error
protocol
->
store
(
mi
->
rli
.
last_error
().
message
,
&
my_charset_bin
);
pthread_mutex_unlock
(
&
mi
->
rli
.
err_lock
);
pthread_mutex_unlock
(
&
mi
->
err_lock
);
pthread_mutex_unlock
(
&
mi
->
rli
.
data_lock
);
pthread_mutex_unlock
(
&
mi
->
data_lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment