mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29499 Improving the 'Can't execute init_slave query' error message with the actual failure
Currently, there are multiple error codes reported for the issue 'Can't execute init_slave query'. Those error codes are the underlying reason the init_slave query cannot be executed, but this makes it difficult to detect the issue in an automated way. This patch introduces a new error code, ER_INIT_SLAVE_ERROR, to unify all the errors related to the init_slave query. The ER_INIT_SLAVE_ERROR error is raised for any issue related to the init_slave query, and the underlying error code and message are included in the Last_SQL_Error field. Reviewed by: Jimmy Hu <jimmy.hu@mariadb.com> Brandon Nesterenko <brandon.nesterenko@mariadb.com>
This commit is contained in:
committed by
Brandon Nesterenko
parent
28dbfcb397
commit
247e2f8d4d
@@ -72,6 +72,10 @@ set @@global.debug_dbug = @saved_dbug;
|
||||
######################################################################
|
||||
# Injecting faults in the init_slave option
|
||||
######################################################################
|
||||
|
||||
# MDEV-29499 introduces a new error code for init_slave errors
|
||||
# 4226 = ER_INIT_SLAVE_ERROR
|
||||
# 1064 = ER_PARSE_ERROR
|
||||
connection slave;
|
||||
|
||||
reset slave;
|
||||
@@ -79,11 +83,14 @@ reset slave;
|
||||
SET GLOBAL init_slave= "garbage";
|
||||
|
||||
start slave;
|
||||
# 1064 = ER_PARSE_ERROR
|
||||
--let $slave_sql_errno= 1064
|
||||
# 4226 = ER_INIT_SLAVE_ERROR
|
||||
--let $slave_sql_errno= 4226
|
||||
# This test also checks that the root error code - 1064 in this case - is
|
||||
# included in the Last_SQL_Error
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
|
||||
|
||||
######################################################################
|
||||
# Clean up
|
||||
######################################################################
|
||||
|
Reference in New Issue
Block a user