server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-29499 Improving the 'Can't execute init_slave query' error message with the actual failure

Open apostolis1 opened this issue 7 months ago • 5 comments
trafficstars

  • [x] The Jira issue number for this PR is: MDEV-29499

Description

This PR introduces a new error code for all the 'Can't execute init_slave query' errors. Also, the error message is improved by including the actual failure.

How can this PR be tested?

The tests already in place are modified to expect the newly introduced error code. Additionally, check that the actual failure error code is included in Last_SQL_Error. For example, when the actual failure is ER_PARSE_ERROR, the error code (1064) is included in the Last_SQL_Error, which is something like 'Slave SQL thread aborted. Can't execute init_slave query, due to error code 1064: You have an error in your SQL syntax'

Basing the PR against the correct MariaDB version

  • [x] This is a new feature or a refactoring, and the PR is based against the main branch.
  • [ ] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

I have signed the MCA and sent it to [email protected]

apostolis1 avatar Apr 03 '25 13:04 apostolis1