Fixed #22738 -- made finer distinctions for when Boolean is not detected on Oracle

This is first served as a PR for two purposes:

1) To let interested parties review it
2) To verify by Jenkins that the fix indeed works.
On second thought, you're right, I'm defining an interface here.