Bug #114021 mysqldump --replace produces *some* REPLACE IGNORE statements
Submitted: 16 Feb 2024 20:12 Modified: 19 Feb 2024 7:36
Reporter: KB Benton Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:8.0.35 (at least), 8.0.36 OS:Ubuntu (22.04.1)
Assigned to: CPU Architecture:x86

[16 Feb 2024 20:12] KB Benton
Description:
When attempting to get a mysqldump, I find that the following produces some syntax errors in the output. See below. This behavior is not consistent depending on the data. Most of the REPLACE statements are fine but some are invalid.

How to repeat:
$ mysqldump -p --hex-blob --source-data=1 --single-transaction --no-create-info --replace -B mysql | grep '^REPLACE  IGNORE' | cut -c1-80
Enter password:
REPLACE  IGNORE INTO `innodb_index_stats` VALUES ('aql_db','host','PRIMARY','202
REPLACE  IGNORE INTO `innodb_table_stats` VALUES ('aql_db','host','2024-02-02 22

Suggested fix:
Double check that " IGNORE" is only added when appropriate in mysqldump.
[19 Feb 2024 7:36] MySQL Verification Team
Hello KB Benton,

Thank you for the report and feedback.

regards,
Umesh