[MDEV-33359] Inconsistent MariaDB error codes 0, 1045, 2003 when using RESET MASTER and init_connect Created: 2024-02-02  Updated: 2024-02-07

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: affects-tests

Issue Links:
Relates
relates to MDEV-33291 Slave SQL: Could not execute Delete_r... Open

 Description   

# Requires standard m/s setup, use CLI on master to replay the SQL
RESET MASTER;
SET GLOBAL init_connect="foo";
CREATE TABLE t1 (c1 INT, c2 BINARY (25) NOT NULL, c3 SMALLINT(4) NULL, c4 BINARY (15) NOT NULL PRIMARY KEY, c5 SMALLINT NOT NULL UNIQUE KEY,c6 DEC(10,8) NOT NULL DEFAULT 3.141592) ENGINE=MyISAM;
CREATE TABLE t2 (a INT, b SMALLINT NOT NULL, c CHAR(12) NOT NULL, d VARCHAR(64) NOT NULL, e VARCHAR(89), f VARCHAR(5), g LONGBLOB NOT NULL, h BLOB, id BIGINT NOT NULL, KEY(b), KEY(e), PRIMARY KEY(id)) ENGINE=MyISAM;

Leads to (various examples, see end-of-line error codes):

11.3.2 63fb478f88e0061d149f5cdd3c4d21d4a35c7bd9 (Debug, Slave)

2024-02-02 11:37:36 5 [ERROR] Slave I/O: error reconnecting to master 'repl_user@127.0.0.1:11699' - retry-time: 60  maximum-retries: 100000  message: , Internal MariaDB error code: 0

10.4.33 1b747ffd05dd524f8d43b35a2b583dc4c00d767b (Optimized, Slave)

2024-02-02 11:37:36 10 [ERROR] Slave I/O: error reconnecting to master 'repl_user@127.0.0.1:10826' - retry-time: 60  maximum-retries: 86400  message: Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused"), Internal MariaDB error code: 2003

10.6.17 9f40f02a8dda7f2becdc6e752557559e7835546d (Optimized)

2024-02-02 11:36:00 5 [ERROR] Slave I/O: error connecting to master 'repl_user@127.0.0.1:12014' - retry-time: 60  maximum-retries: 100000  message: Access denied for user 'repl_user'@'localhost' (using password: YES), Internal MariaDB error code: 1045

This significantly complicates replication testing automation.



 Comments   
Comment by Roel Van de Paar [ 2024-02-02 ]

The variability further changes depending on what replication format (for example MIXED vs ROW) and possibly if --slave-parallel-threads is being used or not.

Generated at Thu Feb 08 10:38:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.