Bug #100977 REPLICA alias does not work
Submitted: 28 Sep 2020 19:14 Modified: 15 Oct 2020 10:53
Reporter: Sveta Smirnova (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[28 Sep 2020 19:14] Sveta Smirnova
Description:
I am trying to be politically correct and start using START REPLICA instead of START SLAVE command. However, it does not work

How to repeat:
mysql> start replica;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'replica' at line 1

mysql> start slave;
Query OK, 0 rows affected (0.00 sec)

mysql> select @@version;
+--------------+
| @@version    |
+--------------+
| 8.0.21-debug |
+--------------+
1 row in set (0.00 sec)

mysql> \s
--------------
../bin/mysql  Ver 8.0.21 for Linux on x86_64 (Source distribution)

Connection id:		9
Current database:	
Current user:		root@localhost
SSL:			Cipher in use is TLS_AES_256_GCM_SHA384
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server version:		8.0.21-debug Source distribution
...
[28 Sep 2020 19:42] Sveta Smirnova
Same syntax error for STOP REPLICA, RESET REPLICA and SHOW REPLICA STATUS:

mysql> stop replica;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'replica' at line 1
mysql> reset replica;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'replica' at line 1
mysql> show replica status;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'replica status' at line 1
[28 Sep 2020 22:39] Gillian Gunson
After reading through some documentation, it seems that the use of "REPLICA" in these commands doesn't take effect until 8.0.22, but it's not very clear: 

https://dev.mysql.com/doc/refman/8.0/en/stop-replica.html and https://dev.mysql.com/doc/refman/8.0/en/stop-slave.html mention the alias goes into effect in 8.0.22, while

https://dev.mysql.com/doc/refman/8.0/en/start-replica.html doesn't mention 8.0.22 at all (while https://dev.mysql.com/doc/refman/8.0/en/start-slave.html does). 

And the change history for 8.0.21 mentions that the documentation is getting the new terminology but "There are currently no changes to the product's syntax, so these terms are still present in the documentation where the current code requires their use." I had to read that a couple times to understand that it meant that the new commands weren't in effect.
[29 Sep 2020 5:34] MySQL Verification Team
Hello Sveta,

Thank you for the report and feedback.
As Gillian pointed, START REPLICA is introduced in MySQL 8.0.22(https://dev.mysql.com/doc/refman/8.0/en/start-slave.html and as part of WL#14171). I'll re-categorize this report as a documentation issue to avoid any further confusion.

regards,
Umesh
[15 Oct 2020 10:53] Margaret Fisher
Posted by developer:
 
Thanks very much for pointing this out, and also for trying out the new terminology. I mistakenly omitted the starting paragraph of explanation from START REPLICA, I have added that in now. I have also clarified in all the commands that the SLAVE versions must be used in earlier releases.