[MDEV-12029] Concurrent CREATE OR REPLACE TRIGGER produces Error on rename of './test/tr.TRN~' to './test/tr.TRN' (Errcode: 2 "No such file or directory") Created: 2017-02-08  Updated: 2021-05-10  Resolved: 2021-05-10

Status: Closed
Project: MariaDB Server
Component/s: Triggers
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-10932 Concurrent trigger creation causes er... Confirmed

 Description   

grammar

query:
    CREATE OR REPLACE TRIGGER tr AFTER INSERT ON _table FOR EACH ROW BEGIN END
;

git clone https://github.com/elenst/rqg rqg
cd rqg
perl ./runall-new.pl --threads=2 --duration=300 --vardir=<vardir> --basedir=<basedir> --grammar=<grammar>

It produces multiple

# 2017-02-08T21:18:58 [32273] Executor::MySQL::execute: Query: CREATE OR REPLACE TRIGGER tr AFTER INSERT ON `BB` FOR EACH ROW BEGIN END /* QUERY_NO 416 CON_ID 8 */  failed: 7 Error on rename of './test/tr.TRN~' to './test/tr.TRN' (Errcode: 2 "No such file or directory")
# 2017-02-08T21:18:58 [32271] Executor::MySQL::execute: Query: CREATE OR REPLACE TRIGGER tr AFTER INSERT ON `CC` FOR EACH ROW BEGIN END /* QUERY_NO 356 CON_ID 7 */  failed: 7 Error on rename of './test/tr.TRN~' to './test/tr.TRN' (Errcode: 2 "No such file or directory")
# 2017-02-08T21:18:58 [32273] Executor::MySQL::execute: Query: CREATE OR REPLACE TRIGGER tr AFTER INSERT ON `B` FOR EACH ROW BEGIN END /* QUERY_NO 424 CON_ID 8 */  failed: 7 Error on rename of './test/tr.TRN~' to './test/tr.TRN' (Errcode: 2 "No such file or directory")

See also MDEV-10912.



 Comments   
Comment by Elena Stepanova [ 2017-02-08 ]

Sometimes I also see this error:

# 2017-02-08T16:33:21 [43553] Executor::MySQL::execute: Query: DROP TRIGGER c failed: 6 Error on delete of './test/c.TRN' (Errcode: 2 "No such file or directory")

It's not easily reproducible, so I can't say for now which versions apart from 10.2 are affected by this one.

Comment by Michael Widenius [ 2021-05-10 ]

This should be fixed by
MDEV-25606: Concurrent CREATE TRIGGER statements mix up in binlog and break replication

Comment by Michael Widenius [ 2021-05-10 ]

Duplicate ofMDEV-25606: Concurrent CREATE TRIGGER statements mix up in binlog and break replication

Generated at Thu Feb 08 07:54:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.