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
8aa473c4
Commit
8aa473c4
authored
Aug 21, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix show_relaylog_events.inc to work for multisource
and fix SHOW RELAYLOG 'src_name' EVENTS to respect src_name
parent
274a47a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
mysql-test/include/show_events.inc
mysql-test/include/show_events.inc
+14
-2
mysql-test/include/show_relaylog_events.inc
mysql-test/include/show_relaylog_events.inc
+2
-1
sql/sql_repl.cc
sql/sql_repl.cc
+4
-2
No files found.
mysql-test/include/show_events.inc
View file @
8aa473c4
...
...
@@ -15,7 +15,19 @@
--
let
$statement
=
show
BINLOG
events
if
(
$is_relay_log
)
{
--
let
$statement
=
show
relaylog
events
if
(
$master_name
)
{
let
_master_name
=
'$master_name'
;
}
if
(
!
$master_name
)
{
let
_master_name
=
`select @@default_master_connection`
;
if
(
$_master_name
)
{
let
_master_name
=
'$_master_name'
;
}
}
--
let
$statement
=
show
relaylog
$_master_name
events
}
if
(
$binlog_file
)
...
...
@@ -25,7 +37,7 @@ if ($binlog_file)
{
if
(
$is_relay_log
)
{
--
let
$_binlog_file
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Relay_Log_File
,
1
)
--
let
$_binlog_file
=
query_get_value
(
SHOW
SLAVE
$_master_name
STATUS
,
Relay_Log_File
,
1
)
}
if
(
!
$is_relay_log
)
{
...
...
mysql-test/include/show_relaylog_events.inc
View file @
8aa473c4
##############################################################################
# Show relay log events
#
# Us
eage:
# Us
age:
# let $binlog_file= slave-relay-bin.000002;
# let $binlog_start= 106;
# let $binlog_limit= 1, 3;
# let $master_name= master1;
# source include/show_relaylog_events.inc;
#
# It shows the first relay log file if $binlog_file is not given.
...
...
sql/sql_repl.cc
View file @
8aa473c4
...
...
@@ -3800,6 +3800,7 @@ bool mysql_show_binlog_events(THD* thd)
int
old_max_allowed_packet
=
thd
->
variables
.
max_allowed_packet
;
Master_info
*
mi
=
0
;
LOG_INFO
linfo
;
LEX_MASTER_INFO
*
lex_mi
=
&
thd
->
lex
->
mi
;
DBUG_ENTER
(
"mysql_show_binlog_events"
);
...
...
@@ -3821,10 +3822,12 @@ bool mysql_show_binlog_events(THD* thd)
}
else
/* showing relay log contents */
{
if
(
!
lex_mi
->
connection_name
.
str
)
lex_mi
->
connection_name
=
thd
->
variables
.
default_master_connection
;
mysql_mutex_lock
(
&
LOCK_active_mi
);
if
(
!
master_info_index
||
!
(
mi
=
master_info_index
->
get_master_info
(
&
thd
->
variables
.
default_master_connection
,
get_master_info
(
&
lex_mi
->
connection_name
,
Sql_condition
::
WARN_LEVEL_ERROR
)))
{
mysql_mutex_unlock
(
&
LOCK_active_mi
);
...
...
@@ -3835,7 +3838,6 @@ bool mysql_show_binlog_events(THD* thd)
if
(
binary_log
->
is_open
())
{
LEX_MASTER_INFO
*
lex_mi
=
&
thd
->
lex
->
mi
;
SELECT_LEX_UNIT
*
unit
=
&
thd
->
lex
->
unit
;
ha_rows
event_count
,
limit_start
,
limit_end
;
my_off_t
pos
=
MY_MAX
(
BIN_LOG_HEADER_SIZE
,
lex_mi
->
pos
);
// user-friendly
...
...
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