Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17429

mysqldump uses 10.3 options with pre-10.3 servers and breaks

Details

    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)

      Attachments

        Issue Links

          Activity

            anel Anel Husakovic added a comment - - edited

            Hi Alan, thanks, will try to do that.
            I have tried dumping file (10.3) to remote (10.2) and this works

            mysql -u user <10.3_file.sql 

            anel Anel Husakovic added a comment - - edited Hi Alan, thanks, will try to do that. I have tried dumping file (10.3) to remote (10.2) and this works mysql -u user <10.3_file.sql
            aschmidt Alan Schmidt added a comment - - edited

            Using mysqldump from 10.3 do this:

            mysqldump -u user -h 10.2-host schema_from_10.2_server >> 10.2_file.sql

            It will fail.

            Please, please, please, try to reproduce the problem as stated. Please do not substitute versions.

            aschmidt Alan Schmidt added a comment - - edited Using mysqldump from 10.3 do this: mysqldump -u user -h 10.2-host schema_from_10.2_server >> 10.2_file.sql It will fail. Please, please, please, try to reproduce the problem as stated. Please do not substitute versions.
            t.munk Tobias Munk added a comment - - edited

            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)

            t.munk Tobias Munk added a comment - - edited 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)

            Closed with 620f4f8af98666e2

            anel Anel Husakovic added a comment - Closed with 620f4f8af98666e2
            Mosinmotte2 Most Motte added a comment -

            Nice and thanks to share it with us.


            Thanks & Regards
            WebHostingReviewsX

            Mosinmotte2 Most Motte added a comment - Nice and thanks to share it with us. – Thanks & Regards WebHostingReviewsX

            People

              anel Anel Husakovic
              rpizzi Rick Pizzi (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.