Fixed #23652 -- Restored database name after destroying test database

Thanks Bjarkias for the report.