Fixed #23761 -- Added test for MySQL validator and db_type is None.

The issue was fixed on master in e9103402c0fa873aea58a6a11dba510cd308cb84
so this just forwardports the test and release notes from stable/1.7.x.

Forwardport of 2d12a59938 from stable/1.7.x