Improve internal testing a bit.

This should get into a full reproducible regression test against MySQL
some day.