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

C extension - fix reference leaks when converting int/long/float (to mysql) #41

Closed
wants to merge 1 commit into from

Conversation

vtermanis
Copy link

@vtermanis vtermanis commented May 10, 2018

When using the C extension (use_pure = False), query argument preparation results in reference leaks (via MySQL_convert_to_mysql) for the following argument types:

  • Python 3: All int and float arguments, via PyObject_Str
  • Python 2: All long arguments (i.e. whenever repr() thereof ends with an "L"), via PyObject_Repr (when numeric is not added to tuple)

Note: There are additional shortcomings in said function which are not addressed by this patch:

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@vtermanis
Copy link
Author

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=90861 for updates.
Thanks

@vtermanis vtermanis deleted the convert_to_mysql_leak branch June 14, 2018 10:38
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