>>>>> "Jules" == Jules Bean <jules@stripped> writes:
Jules> Attached is the output of show processlist (mangled to protect my
Jules> client's private data). I haven't included it in the body of the email,
Jules> since it is far wider that 80 characters..
Jules> I can understand that thread 5875 (INSERT DELAYED INTO tab_b) is blocked
Jules> because of the pending ALTER TABLE (thread 5841).
Jules> But what is not clear to me is why all the INSERT DELAYED INTO tab_a are
Jules> waiting (look at the time column) although there is to tab_a access
Jules> going on.
Jules> Does one DELAYED lock lock all tables? This isn't the impression I got
Jules> from the manual page...
Jules> (the flush tables is a red herring - I started that, as you can tell
Jules> from the timestamps, after the situation had become apparent).
Jules> This is mysql Ver 9.32 Distrib 3.22.23b, for pc-linux-gnu (i586)
I checked the code and the problem is that we have a large lock
around the creating of a 'delayed insert thread'; This means that you
can't create a new insert delayed handler as long as another one is
created. The problem in this case is that a handler on 'tab_b' can't
be created until the ALTER TABLE on 'tab_b' is ready and the handler
on tab_a can't be create until tab_b is ready.
I shall try to fix this by the end of this week. Sorry for the delay...