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
222883b0
Commit
222883b0
authored
Sep 28, 2012
by
Michael Widenius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added multi-source support to show relaylog events
parent
1864d959
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
sql/sql_repl.cc
sql/sql_repl.cc
+19
-3
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
sql/sql_repl.cc
View file @
222883b0
...
...
@@ -2022,6 +2022,7 @@ bool mysql_show_binlog_events(THD* thd)
File
file
=
-
1
;
MYSQL_BIN_LOG
*
binary_log
=
NULL
;
int
old_max_allowed_packet
=
thd
->
variables
.
max_allowed_packet
;
Master_info
*
mi
=
0
;
LOG_INFO
linfo
;
DBUG_ENTER
(
"mysql_show_binlog_events"
);
...
...
@@ -2051,10 +2052,15 @@ bool mysql_show_binlog_events(THD* thd)
}
else
/* showing relay log contents */
{
if
(
!
active_mi
)
mysql_mutex_lock
(
&
LOCK_active_mi
);
if
(
!
(
mi
=
master_info_index
->
get_master_info
(
&
thd
->
variables
.
default_master_connection
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
)))
{
mysql_mutex_unlock
(
&
LOCK_active_mi
);
DBUG_RETURN
(
TRUE
);
binary_log
=
&
(
active_
mi
->
rli
.
relay_log
);
}
binary_log
=
&
(
mi
->
rli
.
relay_log
);
}
if
(
binary_log
->
is_open
())
...
...
@@ -2068,6 +2074,13 @@ bool mysql_show_binlog_events(THD* thd)
mysql_mutex_t
*
log_lock
=
binary_log
->
get_log_lock
();
Log_event
*
ev
;
if
(
mi
)
{
/* We can unlock the mutex as we have a lock on the file */
mysql_mutex_unlock
(
&
LOCK_active_mi
);
mi
=
0
;
}
unit
->
set_limit
(
thd
->
lex
->
current_select
);
limit_start
=
unit
->
offset_limit_cnt
;
limit_end
=
unit
->
select_limit_cnt
;
...
...
@@ -2162,6 +2175,9 @@ bool mysql_show_binlog_events(THD* thd)
mysql_mutex_unlock
(
log_lock
);
}
else
if
(
mi
)
mysql_mutex_unlock
(
&
LOCK_active_mi
);
// Check that linfo is still on the function scope.
DEBUG_SYNC
(
thd
,
"after_show_binlog_events"
);
...
...
sql/sql_yacc.yy
View file @
222883b0
...
...
@@ -11453,7 +11453,7 @@ show_param:
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
} opt_limit_clause_init
| RELAYLOG_SYM EVENTS_SYM binlog_in binlog_from
| RELAYLOG_SYM
optional_connection_name
EVENTS_SYM binlog_in binlog_from
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
...
...
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