Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-475

LP #932614: pt-slave-restart CHANGE MASTER query causes error

    XMLWordPrintable

    Details

      Description

      **Reported in Launchpad by Mrten last update 14-01-2013 22:17:04

      This is very low priority I guess but had me confused for a few minutes.

      I've got a crashed replication and thought 'what the hell, lets see what pt-slave-restart does on it'.

      relevant excerpt of SHOW SLAVE STATUS:

      Last_SQL_Errno: 1594
      Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

      This is the result:

      root@miho:/var/log/mysql# pt-slave-restart
      2012-02-15T10:50:28 mysqld-relay-bin.001752 56390555 1594
      DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''56390410'' at line 1 [for Statement "CHANGE MASTER TO MASTER_LOG_FILE=?, MASTER_LOG_POS=?" with ParamValues: 0='mysql-bin.000142', 1='56390410'] at /usr/bin/pt-slave-restart line 2673.

      "Huh? What's wrong with that query then?"

      I understand why it doesn't work, and that it can't work, but perhaps there should be a list of errors that pt-slave-restart should refuse to run on?

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: