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

MariaDB 10.0.13 reports malformed/wrong table name at the replication error message

    Details

    • Type: Bug
    • Status: Stalled
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.13
    • Fix Version/s: 10.0
    • Component/s: Replication
    • Labels:
    • Environment:
      CentOS 6

      Description

      On replication failure, the error message contains malformed/wrong table name as seen bellow:

      [ERROR] Slave SQL: Query caused different errors on master and slave. Error on master: message (format)='Tablespace for table '%-.192s' exists.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            It was an intentional change in MySQL, the key word here is "(format)".
            See http://bugs.mysql.com/bug.php?id=46697:

            Previously, when a statement failed with a different error on the
            slave than on the master, the slave SQL thread displayed a message
            containing:

            • The error message for the master error code
            • The master error code
            • The error message for the slaves error code
            • The slave error code

            However, the slave has no information with which to fill in any print
            format specifiers for the master message, so it actually displayed
            the message format string. To make it clearer that the slave is not
            displaying the actual message as it appears on the master, the slave
            now indicates that the master part of the output is the message
            format, not the actual message. For example, previously the slave
            displayed information like this:

            Error: "Query caused different errors on master and slave. Error on
            master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on
            slave: 'no error' (0). Default database: 'test'. Query: 'insert into
            t1 values(1),(2)'" (expected different error codes on master and
            slave)

            Now the slave displays this:

            Error: "Query caused different errors on master and slave. Error on
            master: message format='Duplicate entry '%-.192s' for key %d' error
            code=1062 ; Error on slave: actual message='no error', error code=0.
            Default database: 'test'. Query: 'insert into t1 values(1),(2)'"
            (expected different error codes on master and slave)

            Show
            elenst Elena Stepanova added a comment - It was an intentional change in MySQL, the key word here is "(format)". See http://bugs.mysql.com/bug.php?id=46697: Previously, when a statement failed with a different error on the slave than on the master, the slave SQL thread displayed a message containing: The error message for the master error code The master error code The error message for the slaves error code The slave error code However, the slave has no information with which to fill in any print format specifiers for the master message, so it actually displayed the message format string. To make it clearer that the slave is not displaying the actual message as it appears on the master, the slave now indicates that the master part of the output is the message format, not the actual message. For example, previously the slave displayed information like this: Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Now the slave displays this: Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
            Hide
            elenst Elena Stepanova added a comment -

            Please comment to re-open if you disagree.

            Show
            elenst Elena Stepanova added a comment - Please comment to re-open if you disagree.
            Hide
            simon.mudd Simon J Mudd added a comment - - edited

            Hi. I agree this is not a bug per se but the message is confusing as presented, but again triggered by an upstream problem.

            That said I´d like to see this shown differently to make it much clearer what the problem is and where it comes from.

            So I´d suggest the following:

            (1) make this report the different error messages on different lines, this makes the huge “blob of an error message” easier to read.
            (2) if you don’t know the text on the master say so more clearly: showing printf formatting is just silly.

            An example below (reformatted) but with the SQL munged somewhat to protect the innocent looks much easier to understand:

            140917 21:30:04 [ERROR] Slave SQL: Query caused different errors on master and slave.
            140917 21:30:04 [ERROR] => Error on master[error code=1813]: 'Tablespace for table '<VALUE_FROM_MASTER_UNKNOWN>' exists. Please DISCARD the tablespace before IMPORT.'
            140917 21:30:04 [ERROR] => Error on slave[error code=0] (no error)
            140917 21:30:04 [ERROR] => Default database: 'xxxxxx'. Query: 'CREATE TABLE `xxxxxxx_YYYYMMDD` (
            `xxxxxxxxx_id` mediumint(8) unsigned NOT NULL,
            `xxxxx_id` int(11) NOT NULL DEFAULT '0',
            `xxxxx` varchar(255) DEFAULT NULL,
            `xxxxxxxxx_id` smallint(5) unsigned DEFAULT NULL,
            `xxxx_id` int(11) DEFAULT NULL,
            `xxxxxxxx` int(10) unsigned DEFAULT NULL,
            `xxxxxxxxxxxxxxxx` int(10) unsigned DEFAULT NULL,
            `xxxxxxxxxxx` int(10) unsigned DEFAULT NULL,
            `xxxxxxxxxx` mediumint(8) unsigned DEFAULT NULL,
            `xxxxxxxxxxxxxxxxxxxxxx` decimal(10,2) DEFAULT NULL,
            `xxxxxxxx` decimal(10,2) DEFAULT NULL,
            `xxx` decimal(12,4) NOT NULL DEFAULT '0.0000',
            `xxxxxxxxx` double NOT NULL DEFAULT '1',
            `xxxxxxxxxx
            ...

            Replace any format values with something like VALUE_FROM_MASTER_UNKNOWN.
            Trying to merge an error of this type into a single long line just gives me a headache.

            Show
            simon.mudd Simon J Mudd added a comment - - edited Hi. I agree this is not a bug per se but the message is confusing as presented, but again triggered by an upstream problem. That said I´d like to see this shown differently to make it much clearer what the problem is and where it comes from. So I´d suggest the following: (1) make this report the different error messages on different lines, this makes the huge “blob of an error message” easier to read. (2) if you don’t know the text on the master say so more clearly: showing printf formatting is just silly. An example below (reformatted) but with the SQL munged somewhat to protect the innocent looks much easier to understand: 140917 21:30:04 [ERROR] Slave SQL: Query caused different errors on master and slave. 140917 21:30:04 [ERROR] => Error on master [error code=1813] : 'Tablespace for table '<VALUE_FROM_MASTER_UNKNOWN>' exists. Please DISCARD the tablespace before IMPORT.' 140917 21:30:04 [ERROR] => Error on slave [error code=0] (no error) 140917 21:30:04 [ERROR] => Default database: 'xxxxxx'. Query: 'CREATE TABLE `xxxxxxx_YYYYMMDD` ( `xxxxxxxxx_id` mediumint(8) unsigned NOT NULL, `xxxxx_id` int(11) NOT NULL DEFAULT '0', `xxxxx` varchar(255) DEFAULT NULL, `xxxxxxxxx_id` smallint(5) unsigned DEFAULT NULL, `xxxx_id` int(11) DEFAULT NULL, `xxxxxxxx` int(10) unsigned DEFAULT NULL, `xxxxxxxxxxxxxxxx` int(10) unsigned DEFAULT NULL, `xxxxxxxxxxx` int(10) unsigned DEFAULT NULL, `xxxxxxxxxx` mediumint(8) unsigned DEFAULT NULL, `xxxxxxxxxxxxxxxxxxxxxx` decimal(10,2) DEFAULT NULL, `xxxxxxxx` decimal(10,2) DEFAULT NULL, `xxx` decimal(12,4) NOT NULL DEFAULT '0.0000', `xxxxxxxxx` double NOT NULL DEFAULT '1', `xxxxxxxxxx ... Replace any format values with something like VALUE_FROM_MASTER_UNKNOWN. Trying to merge an error of this type into a single long line just gives me a headache.

              People

              • Assignee:
                Unassigned
                Reporter:
                ivan.stoykov@skysql.com Stoykov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: