[1.6.x] Fixed #21243 -- Corrected exception message in multiple database tests.

Thanks to vajrasky for the report and patch.

Backport of a971d19 from trunk.