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

ODBC-207 Fix multi-statement param realloc #29

Merged
merged 1 commit into from Jan 4, 2019

Conversation

joshuactm
Copy link
Contributor

Example use case:
Prepare the following SQL statement:
"INSERT INTO tbl (a,b) VALUES (?,?); SELECT 1 FROM tbl WHERE c = ?"
First execution of prepared statement will work, second execution will segfault or cause memory corruption.

Fix is simply to reallocate parameter storage every time the number of parameters changes.

Example use case:
Prepare the following SQL statement:
"INSERT INTO tbl (a,b) VALUES (?,?); SELECT 1 FROM tbl WHERE c = ?"
First execution of prepared statement will work, second execution will segfault or cause memory corruption.
@lawrinn
Copy link
Collaborator

lawrinn commented Jan 3, 2019

Hello Joshua,

Thank you for your contribution!

Similar to other open source projects, the MariaDB Corporation needs to have shared ownership of all code that is included in the MariaDB C/ODBC distribution. The easiest way to achieve this is by submitting your code under the BSD-new license.

The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/

Please indicate in a comment below that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.

Best regards,
Lawrin

@joshuactm
Copy link
Contributor Author

I am contributing my new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license.
Thanks!

@lawrinn lawrinn merged commit 7b463c1 into mariadb-corporation:master Jan 4, 2019
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