Rafal and I tracked the problem down to a bug in be_default.cc.
In Backup::get_data() we have a wrong "optimization":
Optimization: If this is the last table to read, close the tables and
kill the lock thread. This only applies iff we are using the thread.
if (locking_thd->tables_in_backup->next_global == NULL)
Remove these lines and the INSERT blocks in wait_for_lock() as it should.
The problem was that the locking thread was killed too early.
Rafal and I agree that you can add this change to your patch. We don't
need a dedicated bug report for it.
Ingo Strüwing, Database Group
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring HRB München 161028