mysqldump --all-databases not dumping any databases with 5.7.33
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Since the 5.7.33 upgrade, our Xenial host, talking to an old server that reports itself as 5.1.73-1+deb6u1 is no long dumping all databases with "--all-databases". It connects, exits with 0 and puts out some info, but the actual databases are not dumped at all.
I ran strace on it and I can see mysqldump running the query and getting a response, then it does a sync and proceeds to exit.
---
13362 sendto(3, "\17\0\0\0\3SHOW DATABASES", 19, 0, NULL, 0) = 19
13362 recvfrom(3, "\1\0\0\
13362 sendto(3, "'\0\0\0\3SHOW VARIABLES LIKE 'ndbinfo\
13362 recvfrom(3, "\1\0\0\
13362 fdatasync(1) = -1 EINVAL (Invalid argument)
13362 sendto(3, "\1\0\0\0\1", 5, 0, NULL, 0) = 5
13362 shutdown(3, SHUT_RDWR) = 0
---
the "zanata" db should be dumped, it clearly seemed to respond with the db so there isn't any problem with the connection, etc.
I installed 5.7.32 from [1] and it works. Here is the similar trace
---
15847 sendto(3, "\17\0\0\0\3SHOW DATABASES", 19, 0, NULL, 0) = 19
15847 recvfrom(3, "\1\0\0\
15847 sendto(3, "'\0\0\0\3SHOW VARIABLES LIKE 'ndbinfo\
15847 recvfrom(3, "\1\0\0\
15847 sendto(3, "\7\0\0\0\2zanata", 11, 0, NULL, 0) = 11
15847 recvfrom(3, "\7\0\0\
15847 write(1, "\n--\n-- Current Database: `zanata`\n--\n", 37) = 37
... and the db dumps ...
---
I note that [2] has a note
---
When invoked with the --all-databases option, mysqldump now dumps the mysql database first, so that when the dump file is reloaded, any accounts named in the DEFINER clause of other objects will already have been created. (Bug #32141046)
---
possibly this is related.
This is quite unfortunate because you think your backup is working, but it's silently failing.
Specifying the individual database to mysqldump does work, it only appears to be the --all-databases option that is not working.
[1] https:/
[2] https:/
description: | updated |
description: | updated |
summary: |
- mysqldump --all-databases not dumping with 5.7.33 + mysqldump --all-databases not dumping any databases with 5.7.33 |
Changed in mysql-5.7 (Ubuntu): | |
status: | New → Fix Released |
From the strace you posted, it sounds like it's looking up the ndbinfo_version variable, and doesn't like what it gets in return. That sounds like 5.7.33 adds a version requirement that your 5.1.73 server no longer satisfies.
https:/ /launchpadlibra rian.net/ 520707397/ mysql-5. 7_5.7.32- 0ubuntu0. 18.04.1_ 5.7.33- 0ubuntu0. 18.04.1. diff.gz
I'm not spotting in the diff any obvious code that is setting a version requirement or otherwise interacting with this variable, though. I wonder if the issue might relate to 5.7.33 expecting to see 'mysql' returned as the first table?
Unfortunately 5.1 is quite past its support date so if the issue is particular to that version I'm not sure there's much we'd do; even 5.7 is rather long in the tooth. However, if you can isolate a change in the above diff that can be traced to the issue, or if you come up with a good mechanism to reproduce the problem, or if you see the issue reproducing with newer server versions, feel free to reopen for us to reconsider.