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
e1158e60
Commit
e1158e60
authored
Mar 21, 2010
by
Andrei Elkin
Browse files
Options
Browse Files
Download
Plain Diff
merging bug@51398 to trun-bf from local bf-branch
parents
ad2de797
cf206a57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
+1
-3
mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
+16
-11
No files found.
mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
View file @
e1158e60
...
...
@@ -290,12 +290,10 @@ a b
2 on slave
Heartbeat event received on master
Heartbeat event received on slave
Slave has received more events than master (1 means 'yes'): 1
*** Clean up ***
include/stop_slave.inc
DROP TABLE t1;
include/stop_slave.inc
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
End of
6.0 test
End of
tests
mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
View file @
e1158e60
...
...
@@ -10,6 +10,12 @@
# * Circular replication
#############################################################
--
source
include
/
master
-
slave
.
inc
#
# The test runs long and does not have any specifics to
# binlog_format. It is choosen therefore to run with MIXED mode
# in order to not slow down much `make test'.
#
--
source
include
/
have_binlog_format_mixed
.
inc
--
echo
--
echo
***
Preparing
***
...
...
@@ -462,6 +468,9 @@ EOF
--
enable_reconnect
--
source
include
/
wait_until_connected_again
.
inc
--
connection
slave
# make sure IO thread has re-connected
# due to slow valgrind env the following wait_for_status may time out
--
source
include
/
wait_for_slave_io_to_start
.
inc
# Wait until slave_received_heartbeats will be incremented
let
$status_var_value
=
query_get_value
(
SHOW
STATUS
LIKE
'slave_received_heartbeats'
,
Value
,
1
);
let
$status_var
=
slave_received_heartbeats
;
...
...
@@ -470,7 +479,7 @@ let $status_var_comparsion= >;
--
echo
Heartbeat
event
received
--
echo
# Circular replication
# Circular replication
: demonstrating bidirectional hearbeat flow
--
echo
***
Circular
replication
***
# Configure circular replication
--
source
include
/
master
-
slave
-
reset
.
inc
...
...
@@ -499,15 +508,16 @@ SELECT * FROM t1 ORDER BY a;
let
$master_rcvd_heartbeats_before
=
query_get_value
(
SHOW
STATUS
LIKE
'slave_received_heartbeats'
,
Value
,
1
);
--
connection
slave
SELECT
*
FROM
t1
ORDER
BY
a
;
# Wait heartbeat event on master
# Wait for heartbeat event on master
--
connection
master
let
$status_var
=
slave_received_heartbeats
;
let
$status_var_value
=
query_get_value
(
SHOW
STATUS
LIKE
'slave_received_heartbeats'
,
Value
,
1
);
let
$status_var_comparsion
=
>
;
--
source
include
/
wait_for_status_var
.
inc
--
echo
Heartbeat
event
received
on
master
let
$master_rcvd_heartbeats
=
query_get_value
(
SHOW
STATUS
LIKE
'slave_received_heartbeats'
,
Value
,
1
);
# Wait heartbeat event on slave
# Wait heartbeat event
s
on slave
--
connection
slave
let
$status_var
=
slave_received_heartbeats
;
let
$status_var_value
=
query_get_value
(
SHOW
STATUS
LIKE
'slave_received_heartbeats'
,
Value
,
1
);
...
...
@@ -515,11 +525,6 @@ let $status_var_comparsion= >;
--
source
include
/
wait_for_status_var
.
inc
--
echo
Heartbeat
event
received
on
slave
let
$slave_rcvd_heartbeats
=
query_get_value
(
SHOW
STATUS
LIKE
'slave_received_heartbeats'
,
Value
,
1
);
# Heartbeat period on slave less than on master therefore number of received events on slave
# should be greater than on master
let
$result
=
query_get_value
(
SELECT
(
$slave_rcvd_heartbeats
DIV
$master_rcvd_heartbeats
)
>
1
AS
Result
,
Result
,
1
);
--
echo
Slave
has
received
more
events
than
master
(
1
means
'yes'
)
:
$result
--
echo
#
# Clean up and restore system variables
...
...
@@ -533,5 +538,5 @@ DROP TABLE t1;
SET
@@
global
.
slave_net_timeout
=@
restore_slave_net_timeout
;
--
echo
# End of
6.0 test
--
echo
End
of
6.0
test
# End of
tests
--
echo
End
of
tests
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