[1.7.x] Fixed #22715: Corrected sql for defaults of BinaryField on Oracle with Python3

While at it, fixed a problem in returning empty values
(still with BinaryField/Oracle/Python3).

Backport of fd427f1 from master