Fixed test failure on MySQL

The fix for #20874 caused a MySQL specific failure.