Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #23434 -- Coerce Oracle bool params to int #3190

Closed
wants to merge 1 commit into from

Conversation

jarshwah
Copy link
Member

@jarshwah jarshwah commented Sep 7, 2014

Oracle boolean query parameters are coerced to the strings "1" and "0" rather than the ints 1 and 0. This causes issues when trying to write a query like:

cursor.execute("SELECT %s as bool_value ...", True)

These kinds of queries can be generated with #2496 , and prevent result converters from operating on the correct type. By changing the parameters to integers, we get the appropriate type back from the database (a number), and the converters correctly change that value to the appropriate bool.

@jarshwah
Copy link
Member Author

jarshwah commented Sep 7, 2014

Looks like py2 tests pass on Oracle, and I personally checked that a subset of the py3 tests pass on Oracle.

@timgraham
Copy link
Member

merged in 638d139.

@timgraham timgraham closed this Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants