[MDEV-17429] mysqldump uses 10.3 options with pre-10.3 servers and breaks Created: 2018-10-11 Updated: 2019-07-24 Resolved: 2019-06-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements, Scripts & Clients |
| Affects Version/s: | 10.3.10 |
| Fix Version/s: | 10.3.17, 10.4.7 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Rick Pizzi | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 5 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
When issuing a 10.3 mysqldump command to dump triggers and routines from a 10.2 server, the tool breaks because it tries to issue a SHOW PACKAGES command which is not supported in 10.2 and earlier releases. mysqldump --quick --routines --triggers --no-create-info --skip-lock-tables --no-data --compress -h 10.10.16.138 -u mariadb_mock_import -p myschema .... mysqldump: Couldn't execute 'SHOW PACKAGE STATUS WHERE Db = 'myschema'': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PACKAGE STATUS WHERE Db = 'myschema'' at line 1 (1064) |
| Comments |
| Comment by Elena Stepanova [ 2018-10-13 ] | |
|
I would think that cross-version mysqldump is not expected to work, but unfortunately the documentation not only doesn't support this claim, but implies otherwise by having "mysqldump and old versions of MySQL" section. Of course the use case described there is different, it's about dumping the current schema and loading it somewhere else; but still, if we start documenting incompatibilities as special cases, it means that everything is compatible otherwise, and if it's not, it must be mentioned in the documentation as well. serg, what do you think? Do we want to support the backward compatibility of clients with older servers, or document that we don't? | |
| Comment by Rick Pizzi [ 2018-10-15 ] | |
|
I would suggest to implement a check around the "SHOW PACKAGES" command, which is a 10.3 thing, so it is not fired when server doesn't support it, or at least do not error out on it. I guess some customers may find 10.3 client installed by default on many linux distros soon, | |
| Comment by Sergei Golubchik [ 2018-10-16 ] | |
|
I think it's a bug | |
| Comment by Anel Husakovic [ 2019-01-30 ] | |
|
Hi I couldn't reproduce this error. | |
| Comment by Philip orleans [ 2019-01-30 ] | |
|
Try to dump a database 10.2 with mysqldump 10.3, it fails. | |
| Comment by Alan Schmidt [ 2019-03-07 ] | |
|
Well, another month has gone by. Perhaps a different scenario might help communicate that this is a problem that needs a solution sooner rather than later. 1) Run 10.2 Server or less on a remote server. Perhaps a web host somewhere. If you do not have shell access to the remote server (it is not uncommon for web hosts to disallow this access), the most practical approach is to install the Oracle version of the software, just for interoperability. It is easier to do this with your distribution's package manager than to downgrade. | |
| Comment by Anel Husakovic [ 2019-03-11 ] | |
|
Hi Alan, thanks, will try to do that.
| |
| Comment by Alan Schmidt [ 2019-06-04 ] | |
|
Using mysqldump from 10.3 do this:
It will fail. Please, please, please, try to reproduce the problem as stated. Please do not substitute versions. | |
| Comment by Tobias Munk [ 2019-06-11 ] | |
|
I ran into the same issue. This is a very annoying, ie. on Arch Linux, where you have to build older versions, which takes hours. And especially when taking this into account mysqldump from an earlier MariaDB release cannot be used on MariaDB 10.3 and beyond. from https://mariadb.com/kb/en/library/mysqldump/ We need some kind of --flag to be able to use mysqldump from Maria 10.3 with older versions. [addon] Works without --routines (for me) | |
| Comment by Anel Husakovic [ 2019-06-24 ] | |
|
Closed with 620f4f8af98666e2 | |
| Comment by Most Motte [ 2019-07-24 ] | |
|
Nice and thanks to share it with us. – |