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
467217e6
Commit
467217e6
authored
Aug 26, 2016
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-9510: Print extra info to error log
Activated by enabling wsrep_debug.
parent
a66092f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
sql/log.cc
sql/log.cc
+26
-0
No files found.
sql/log.cc
View file @
467217e6
...
@@ -3138,6 +3138,22 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
...
@@ -3138,6 +3138,22 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
}
}
/*
Print some additional information about addition/removal of
XID list entries.
TODO: Remove once MDEV-9510 is fixed.
*/
#ifdef WITH_WSREP
#define WSREP_XID_LIST_ENTRY(X, Y) \
if (wsrep_debug) \
{ \
char buf[FN_REFLEN]; \
strmake(buf, Y->binlog_name, Y->binlog_name_len); \
WSREP_DEBUG(X, buf, Y->binlog_id); \
}
#else
#define WSREP_XID_LIST_ENTRY(X, Y) do { } while(0)
#endif
MYSQL_BIN_LOG
::
MYSQL_BIN_LOG
(
uint
*
sync_period
)
MYSQL_BIN_LOG
::
MYSQL_BIN_LOG
(
uint
*
sync_period
)
:
reset_master_pending
(
0
),
mark_xid_done_waiting
(
0
),
:
reset_master_pending
(
0
),
mark_xid_done_waiting
(
0
),
...
@@ -3200,6 +3216,8 @@ void MYSQL_BIN_LOG::cleanup()
...
@@ -3200,6 +3216,8 @@ void MYSQL_BIN_LOG::cleanup()
*/
*/
DBUG_ASSERT
(
b
->
xid_count
==
0
);
DBUG_ASSERT
(
b
->
xid_count
==
0
);
DBUG_ASSERT
(
!
binlog_xid_count_list
.
head
());
DBUG_ASSERT
(
!
binlog_xid_count_list
.
head
());
WSREP_XID_LIST_ENTRY
(
"MYSQL_BIN_LOG::cleanup(): Removing xid_list_entry "
"for %s (%lu)"
,
b
);
my_free
(
b
);
my_free
(
b
);
}
}
...
@@ -3691,9 +3709,13 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
...
@@ -3691,9 +3709,13 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
/* Remove any initial entries with no pending XIDs. */
/* Remove any initial entries with no pending XIDs. */
while
((
b
=
binlog_xid_count_list
.
head
())
&&
b
->
xid_count
==
0
)
while
((
b
=
binlog_xid_count_list
.
head
())
&&
b
->
xid_count
==
0
)
{
{
WSREP_XID_LIST_ENTRY
(
"MYSQL_BIN_LOG::open(): Removing xid_list_entry for "
"%s (%lu)"
,
b
);
my_free
(
binlog_xid_count_list
.
get
());
my_free
(
binlog_xid_count_list
.
get
());
}
}
mysql_cond_broadcast
(
&
COND_xid_list
);
mysql_cond_broadcast
(
&
COND_xid_list
);
WSREP_XID_LIST_ENTRY
(
"MYSQL_BIN_LOG::open(): Adding new xid_list_entry for "
"%s (%lu)"
,
new_xid_list_entry
);
binlog_xid_count_list
.
push_back
(
new_xid_list_entry
);
binlog_xid_count_list
.
push_back
(
new_xid_list_entry
);
mysql_mutex_unlock
(
&
LOCK_xid_list
);
mysql_mutex_unlock
(
&
LOCK_xid_list
);
...
@@ -4228,6 +4250,8 @@ bool MYSQL_BIN_LOG::reset_logs(THD *thd, bool create_new_log,
...
@@ -4228,6 +4250,8 @@ bool MYSQL_BIN_LOG::reset_logs(THD *thd, bool create_new_log,
if
(
b
->
binlog_id
==
current_binlog_id
)
if
(
b
->
binlog_id
==
current_binlog_id
)
break
;
break
;
DBUG_ASSERT
(
b
->
xid_count
==
0
);
DBUG_ASSERT
(
b
->
xid_count
==
0
);
WSREP_XID_LIST_ENTRY
(
"MYSQL_BIN_LOG::reset_logs(): Removing "
"xid_list_entry for %s (%lu)"
,
b
);
my_free
(
binlog_xid_count_list
.
get
());
my_free
(
binlog_xid_count_list
.
get
());
}
}
mysql_cond_broadcast
(
&
COND_xid_list
);
mysql_cond_broadcast
(
&
COND_xid_list
);
...
@@ -9471,6 +9495,8 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint)
...
@@ -9471,6 +9495,8 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint)
DBUG_ASSERT
(
b
);
DBUG_ASSERT
(
b
);
if
(
b
->
binlog_id
==
current
||
b
->
xid_count
>
0
)
if
(
b
->
binlog_id
==
current
||
b
->
xid_count
>
0
)
break
;
break
;
WSREP_XID_LIST_ENTRY
(
"TC_LOG_BINLOG::mark_xid_done(): Removing "
"xid_list_entry for %s (%lu)"
,
b
);
my_free
(
binlog_xid_count_list
.
get
());
my_free
(
binlog_xid_count_list
.
get
());
}
}
...
...
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