Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-7486

Make mysqldump compatible with ProxySQL after changes added on PS-6112

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Won't Fix
    • 5.7.32-35
    • None
    • None
    • Yes

    Description

      After changes on PS-6112, mysqldump will fail with the following errors on a ProxySQL instance:

      shell> mysqldump -uproxysql -pXXXXX -h127.0.0.1 -P6032 --no-tablespaces --skip-triggers -t main proxysql_servers
      mysqldump: [Warning] Using a password on the command line interface can be insecure.
      -- MySQL dump 10.13 Distrib 5.7.32-35, for Linux (x86_64)
      --
      -- Host: 127.0.0.1 Database: main
      -- ------------------------------------------------------
      -- Server version 5.5.30
      
      ...
      
      mysqldump: Couldn't execute 'SHOW STATUS LIKE 'binlog_snapshot_gtid_executed'': ProxySQL Admin Error: near "SHOW": syntax error (1045) 

      The issue here is that the checks added to see if the instance supports the variable at:

      https://github.com/percona/percona-server/blob/5.7/client/mysqldump.c#L1392

      are calling:

      https://github.com/percona/percona-server/blob/5.7/client/mysqldump.c#L1317

      which in turn is calling:

      https://github.com/percona/percona-server/blob/5.7/client/mysqldump.c#L1283 

      The maybe_die function is making the mysqldump process to terminate with errors, due to syntax "SHOW STATUS" not being supported on ProxySQL:

      mysql> show status like 'binlog_snapshot_gtid_executed';
      ERROR 1045 (28000): ProxySQL Admin Error: near "show": syntax error 

      as opposed to MySQL/Percona Server, where we get 0 rows if the counter doesn't exist on that version:

      mysql [localhost:45888] {msandbox} ((none)) > show status like 'binlog_snapshot_gtid_executed';
      Empty set (0.01 sec) 

       

      Workaround:

      As seen in description for maybe_die function quoted above, we can use --force in the mysqldump command to ignore these errors. The counterpart of this is that we may also be ignoring other kinds of errors, so caution is to be exercised with this workaround.

      Another workaround is to use mysqldump from versions prior to 5.7.30.

       

      Solution:

      Make mysqldump compatible with ProxySQL, so that we support: https://github.com/sysown/proxysql/issues/392 

       

      Attachments

        Issue Links

          Activity

            People

              amonar Anton Matvienko
              agustin.gallego Agustín Gallego
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist