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

Backport of ac5f2a4ef7b9993502ebc02f487cbb06bfb9bf0a from master

jyotsna1820/django,jyotsna1820/django,oscaro/django,oscaro/django,jyotsna1820/django,jyotsna1820/django,oscaro/django,oscaro/django