mariadb/mysql-test/suite/galera_sr/r/MDEV-21613.result
Daniele Sciascia 5527fc5861 MDEV-21613 Failed to open table mysql.wsrep_streaming_log for writing
Fix sporadic failure for MTR test galera_sr.GCF-1018B. The test
sometimes fails due to an error that is logged to the error log
unnecessarily.
A deterministic test case (included in this patch) shows that the
error is loggen when a transaction is BF aborted right before  it
opens the streaming log table to perform fragment removal. When that
happens, the attempt to open the table fails and consequently an error
is logged. There is no need to log this error, as an ER_LOCK_DEADLOCK
error is returned to the client.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-09-14 11:38:03 +03:00

20 lines
714 B
Text

connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
connection node_1;
SET SESSION wsrep_trx_fragment_size = 1;
SET DEBUG_SYNC = "wsrep_before_fragment_removal SIGNAL fragment_removal_reached WAIT_FOR fragment_removal_continue";
START TRANSACTION;
INSERT INTO t1 VALUES(1), (2);
COMMIT;
connect node_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_ctrl;
SET DEBUG_SYNC = "now WAIT_FOR fragment_removal_reached";
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
TRUNCATE TABLE t1;
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_ctrl;
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;