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

Unify error codes for 'Can't execute init_slave query' into single new error code

    XMLWordPrintable

    Details

      Description

      I have been keeping track of what errors are reported by the server and noticed the following. For basically the same issue:

      Can't execute init_slave query 
      

      I have seen all these errors:

      Internal MariaDB error code: 1046
      Internal MariaDB error code: 1064
      Internal MariaDB error code: 1193
      Internal MariaDB error code: 1231
      Internal MariaDB error code: 1054
      Internal MariaDB error code: 1237
      

      This is confusing, and it affects testing as other issues are being missed due to all these errors being filtered. Here is perror output for these errors:

      $ ./bin/perror 1046
      MariaDB error code 1046 (ER_NO_DB_ERROR): No database selected
      $ ./bin/perror 1064
      MariaDB error code 1064 (ER_PARSE_ERROR): %s near '%-.80T' at line %d
      $ ./bin/perror 1193
      MariaDB error code 1193 (ER_UNKNOWN_SYSTEM_VARIABLE): Unknown system variable '%-.*s'
      $ ./bin/perror 1231
      MariaDB error code 1231 (ER_WRONG_VALUE_FOR_VAR): Variable '%-.64s' can't be set to the value of '%-.200T'
      $ ./bin/perror 1054
      MariaDB error code 1054 (ER_BAD_FIELD_ERROR): Unknown column '%-.192s' in '%-.192s'
      $ ./bin/perror 1237
      MariaDB error code 1237 (ER_SLAVE_IGNORED_TABLE): Slave SQL thread ignored the query because of replicate-*-table rules
      

      This bug report to create a single new error code which is hit whenever the slave cannot execute the init_slave query for any reason.

      Testing wise, that error can then be filtered and all the errors above can be unfiltered.

      For users, some resolution (the underlying cause for the Can't execute init_slave query failure) may be missed this way, but in return there will be a single automatable error.

      Then again, perhaps there is another way to achieve this resolution? For example how about (fictive):

      $ ./bin/perror 9999
      MariaDB error code 9999 (ER_INIT_SLAVE_ERROR): Can't execute init_slave query due to MariaDB error code [1046/1064/.../1237/...]: Check ./bin/perror  [1046/1064/.../1237/...] for more info
      

        Attachments

          Activity

            People

            Assignee:
            Elkin Andrei Elkin
            Reporter:
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

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