1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00
Files
mariadb/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result
Apostolis Stamatis 247e2f8d4d 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>
2025-06-13 15:28:38 -06:00

24 lines
944 B
Plaintext

include/master-slave.inc
[connection master]
connection slave;
stop slave;
reset slave;
connection slave;
set @saved_dbug = @@global.debug_dbug;
SET GLOBAL debug_dbug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
start slave;
include/wait_for_slave_sql_error.inc [errno=1593]
Last_SQL_Error = 'Failed during slave thread initialization'
call mtr.add_suppression("Failed during slave.* thread initialization");
set @@global.debug_dbug = @saved_dbug;
connection slave;
reset slave;
SET GLOBAL init_slave= "garbage";
start slave;
include/wait_for_slave_sql_error.inc [errno=4226]
Last_SQL_Error = 'Slave SQL thread aborted. Can't execute init_slave query due to error code 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1'
SET GLOBAL init_slave= "";
include/stop_slave_io.inc
RESET SLAVE;
include/rpl_end.inc