Bug #115752 mysqldump fails with error Couldn't execute 'SHOW BINARY LOG STATUS'
Submitted: 2 Aug 12:31 Modified: 2 Aug 12:59
Reporter: Satish Pahlajani Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: mysqlpump Command-line Client Severity:S2 (Serious)
Version:8.4 OS:Red Hat
Assigned to: CPU Architecture:x86

[2 Aug 12:31] Satish Pahlajani
Description:
I am using latest mysqldump client utility with version (mysqldump  Ver 8.4.0 for Linux on x86_64 (MySQL Community Server - GPL)
) to take backup of database from mysql server version 8.0.37.

mysqldump utility is failing with below error if we try to use --source-data=2 option while creating dump.

ERROR:
mysqldump: Couldn't execute 'SHOW BINARY LOG STATUS': 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 'LOG STATUS' at line 1 (1064)

How to repeat:
perform dump of a database from server version 8.0.37 with latest mysqldump version 8.4 with option --source-data=2 

mysqldump  -h <host> --protocol=tcp  --ssl-mode=REQUIRED  --enable-cleartext-plugin -u <user> -p<password> --events --routines  --triggers --single-transaction --set-gtid-purged=OFF --add-drop-database --default-character-set='utf8' "<db_name>"  --column-statistics=FALSE --source-data=2 --result-file=/data.sql -v
mysqldump: [Warning] Using a password on the command line interface can be insecure.
-- Connecting to xxxxxx...
-- Starting transaction...
mysqldump: Couldn't execute 'SHOW BINARY LOG STATUS': 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 'LOG STATUS' at line 1 (1064)

Suggested fix:
I could see in 8.4 mysqldump utility execute SHOW BINARY LOG STATUS which not work on the server with version prior to 8.4.

but we can expect it to be backward compatible which is not the case right now.
We have multiple mysql server version and dump should be catered by latest mysqldump utility 8.4
[2 Aug 12:46] MySQL Verification Team
Hi Mr. Pahlajani,

Thank you for your bug report.

We. managed to reproduce the behaviour.

However, this is not a bug.

You should use 8.0 command line tools with 8.0 server.

You should use 8.4 command line tools with 8.4 server.

8.0 and 8.4 are two totally different versions of our MySQL.

We tested 8.0 mysqldump with 8.0 server and it worked fine, with all your options.

We tested 8.4 mysqldump with 8.4 server and it worked fine, with all your options.

Not a bug.
[2 Aug 12:59] Satish Pahlajani
Hello,

Thanks For update!

do you mean latest mysqldump(8.4) is not backward compatible with older server version prior to 8.4?

we are maintaining latest version of mysqldump to cater dump for older as well as new version of server. In many cases we can't keep older version of mysqldump as there are some security vulnerability in older version of client which get fixed in latest version.
Before 8.4 a single version of mysqldump was compatible with all older versions which I see got broken in 8.4.
[2 Aug 13:04] MySQL Verification Team
Hi Mr. Pahlajani,

Backwards compatibility was NEVER guaranteed.

Each version is for itself.

If it works sometimes that 8.4 client tool works with 8.0, or similar, it is just a coincidence.

Not a bug.