[1.7.x] Fixed refs #23987 test on Oracle.

Backport of ac5f2a4ef7b9993502ebc02f487cbb06bfb9bf0a from master