START SLAVE UNTIL does not work with parallel replication

Description

When the sql driver thread determines that the START SLAVE UNTIL position is
reached, it initiates normal stop. The problem with parallel replication is
that there may still be a number of events queued for asynchronous application
by the worker threads. So currently, those queued events can be silently
discarded, as they would be for normal STOP SLAVE. This causes START SLAVE
UNTIL to stop too early.

This applies both to GTID and non-GTID UNTIL position.

Environment

None

Status

Assignee

Kristian Nielsen

Reporter

Kristian Nielsen

Labels

None

External issue ID

None

External issue ID

None

Fix versions

Affects versions

10.0.9

Priority

Critical