MDEV-28567 counted two execution sequences, there is third one which
executes ALTER VIEW before f() is created.
The more appropriate place for this test case is lock_sync.test
DBUG_ASSERT(0) was added by MDEV-17554 (auto-create history
partitions) as an experimental measure. Testing has shown this
conditional branch of can_recover_from_failed_open() can be possible
due to MDL deadlock.
The fix replaces DBUG_ASSERT with more specific one for
!OT_ADD_HISTORY_PARTITION.
Test case was synchronized to reproduce deadlock always and commented
with execution path of MDL locking for Good (no deadlock) and Bad
(deadlock). The logging was done with the help of preceding patch for
debug MDL tracing.