The current DBUG_SYNC implementation does not support two 'now SIGNAL xxx' commands
in a row for multiple threads as the first one can get lost while
the waiting threads are sleeping on mysql_cond_timedwait().
This was the reason why deadlock_drop_table.test was failing.
One reason for this is that the signal name is stored in a global variable
that is overwritten. A better way would be to store all signals in
an array together with a 'time' when the signal was sent. This array
should be checked on broadcast.
A workaround for test that uses DEBUG_SYNC with multiple connections is to signal all threads with the same signal. This avoids the issue.
Until this is fixed, you should not use the following in MTR tests:
set debug_sync='now SIGNAL go2';
set debug_sync='now SIGNAL go3';
Update: MySQL 5.7+ has fixed this (and added a lot of comments to debug_sync.cc, which is good!)
The easiest way to fix this bug is to backport the latest debug_sync.cc from MySQL to MariaDB.