Commit graph

2 commits

Author SHA1 Message Date
Sujatha
1247b36bad MDEV-22951: rpl.rpl_slave_alias_replica failed in buildbot with wrong result
Problem:
========
rpl.rpl_slave_alias_replica test fails sporadically on build bot as shown
below.

rpl.rpl_slave_alias_replica 'innodb,stmt' w4 [ fail ]
+++ /usr/local/mariadb-10.5.4-linux-x86_64/mysql-test/suite/rpl/r/
rpl_slave_alias_replica.reject	2020-06-12 09:52:25.191267945 +0000
@@ -22,6 +22,7 @@
 SHOW REPLICA HOSTS;
 Server_id	Host	Port	Master_id
 2	127.0.0.1	SLAVE_PORT	1
+2	127.0.0.1	SLAVE_PORT	1

Analysis:
========
The SHOW REPLICA HOSTS command reports an additional row for the same server
occasionally. This happens because of zombie dump threads on the master.
Error log from master also confirms that "A slave with the same
server_uuid/server_id as this slave has connected to the master". Since SHOW
REPLICA HOSTS goes through the list of dump threads and reports the
corresponding hosts,the same host is reported twice.

Fix:
===
Instead of capturing the SHOW REPLICA HOSTS command in result file use
wait_show_condition.inc. This will ensure that SHOW REPLICA HOSTS command
fetches slave host details.
2020-06-25 15:11:54 +05:30
Sujatha
42e825dd0a MDEV-20601: Make REPLICA a synonym for SLAVE in SQL statements
Fix:
===
Add "REPLICA" as an alias for "SLAVE". All commands which use "SLAVE" keyword
can be used with new alias "REPLICA".

List of commands:

On Master:
=========
SHOW REPLICA HOSTS <--> SHOW SLAVE HOSTS
Privilege "SLAVE"  <--> "REPLICA"

On Slave:
=========
START SLAVE       <--> START REPLICA
START ALL SLAVES  <--> START ALL REPLICAS
START SLAVE UNTIL <--> START REPLICA UNTIL
STOP SLAVE        <--> STOP REPLICA
STOP ALL SLAVES   <--> STOP ALL REPLICAS
RESET SLAVE       <--> RESET REPLICA
RESET SLAVE ALL   <--> RESET REPLICA ALL
SLAVE_POS         <--> REPLICA_POS
2020-02-04 18:16:21 +05:30