In my tests to try to reproduce the problem, I created 2 scripts, one
continuously did "INSERT DELAYED" of a record into a table, and the other
continuously ran OPTIMIZE TABLE on the same table. I ran them both at the
same time at full blast.
The INSERTing script got intermittent failures like this:
DBD::mysql::db do failed: Server shutdown in progress at ./inserter.pl line 14.
DBI ERROR: Server shutdown in progress
...though the script picked right back up again, in it's next insert.
Note that when I did not use INSERT DELAYED, this error did not happen.
Also note that this did not always happen for each optimize. Presumably
this is some sort of race condition.
Also note that at no time did the server get kill itself (as with my bug),
nor did any database corruption occur.
I have no idea if this is related to my bug report. This style of "stress
test" is unrealistic, so I'm not sure if fixing this "problem" should be
important. But, if it is related to my bug report, maybe this will help.