Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
Description
Very soon after startup the concurrent test reports the error
CREATE TRIGGER tr AFTER INSERT ON t2 FOR EACH ROW SET @a=1 failed: 7 Error on rename of './test/tr.TRN~' to './test/tr.TRN' (Errcode: 2 - No such file or directory)
|
Further attempt to deal with the trigger reveals problems. The trigger can be seen via SHOW TRIGGERS:
MySQL [test]> show triggers;
|
+---------+--------+-------+-----------+--------+---------+------------------------+----------------+----------------------+----------------------+--------------------+ |
| Trigger | Event | Table | Statement | Timing | Created | sql_mode | Definer | character_set_client | collation_connection | Database Collation | |
+---------+--------+-------+-----------+--------+---------+------------------------+----------------+----------------------+----------------------+--------------------+ |
| tr | INSERT | t1 | SET @a=1 | AFTER | NULL | NO_ENGINE_SUBSTITUTION | root@127.0.0.1 | latin1 | latin1_swedish_ci | latin1_swedish_ci | |
+---------+--------+-------+-----------+--------+---------+------------------------+----------------+----------------------+----------------------+--------------------+ |
1 row in set (0.00 sec) |
but not via SHOW CREATE TRIGGER:
MySQL [test]> show create trigger tr; |
ERROR 1360 (HY000): Trigger does not exist |
It can't be dropped, either.
All that because the trigger information went out of sync.
The {[TRN}} file says the trigger belongs to t2:
$ cat tr.TRN
|
TYPE=TRIGGERNAME
|
trigger_table=t2
|
but the TRG file belongs to t1:
$ ls -l *.TRG
|
-rw-rw---- 1 elenst elenst 255 Sep 30 19:02 t1.TRG
|
Grammar |
query_init:
|
CREATE TABLE IF NOT EXISTS t1 (i INT); CREATE TABLE t2 LIKE t1;
|
|
my_table:
|
t1 | t2 ;
|
|
query:
|
CREATE TRIGGER tr AFTER INSERT ON my_table FOR EACH ROW SET @a=1
|
| DROP TRIGGER tr
|
;
|
Command line |
perl ./runall-new.pl --grammar=1.yy --threads=2 --skip-gendata --duration=200 --queries=100M --basedir=<basedir> --vardir=<vardir>
|
Attachments
Issue Links
- relates to
-
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")
- Closed
- links to