[MDEV-28720] mariadb-dump creates empty backup without error message/code Created: 2022-05-30 Updated: 2022-10-19 Resolved: 2022-10-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | None |
| Fix Version/s: | 10.3.37, 10.4.27, 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2, 10.11.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Oli Sennhauser | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | beginner-friendly, mariadb-backup | ||
| Environment: |
Debian 11 / Rocky Linux 8.5 |
||
| Attachments: |
|
| Description |
|
Example (binary logs enabled):
Backup is nearly empty... Reason: SQL> FLUSH LOGS; This is really ugly. I would expect a return code Unable to render embedded object: File (= 0 AND an error message) not found. |
| Comments |
| Comment by kurt.ding [ 2022-09-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I try this case in my ubuntu computer, but I can't reproduce. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by kurt.ding [ 2022-09-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
And then I check the code in client/mysqldump.c:7037 , the code is match the case result. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by kurt.ding [ 2022-09-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
So is here another special config you setted or is this case only appear in debian/rocky linux | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Oli Sennhauser [ 2022-09-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Still reproducible in 10.7.1 shell> mariadb-dump --user=root --all-databases --flush-logs --master-data=1 --events --triggers --routines > /tmp/full_dump.sql The reason as I described is this: SQL> FLUSH LOGS; If the MariaDB Error Log is set to a location where mariadbd is not allowed to write and mariadb-dump does a FLUSH LOGS then the dump seems to be aborted and no error is returned. so just set log_error = /root/error.log And you should immediately get the problem. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by kurt.ding [ 2022-09-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I understand what you mean , you set the log_error= /root/error.log within mysqld cnf . So I add an error message like this. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by kurt.ding [ 2022-09-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by kurt.ding [ 2022-09-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-10-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks Kurt Ding, rebased to 10.3 and added MDEV to commit. Tested manually:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-10-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||