main.delayed sporadically fails with "query 'REPLACE DELAYED t1 VALUES (5)' failed: 1317: Query execution was interrupted"

Description

Here is an extract that helps to reproduce the problem quite easily:

Normally it would go to the end and print "All done". With the bug, it stops in the middle with "Query execution was interrupted". Tried Linux and Windows, release and debug builds (particularly, BUILD/compile-pentium-debug-max-no-ndb).

It started happening after MDEV-3941, with this revision:

Environment

None

Status

Assignee

Michael Widenius

Reporter

Elena Stepanova

Labels

None

External issue ID

None

External issue ID

None

Fix versions

Affects versions

Priority

Critical
Configure