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

Closes #3334: Fix crash and memory errors reported by valgrind for v2.1.1 #3335

Merged
merged 4 commits into from
Mar 11, 2021

Conversation

JavierJF
Copy link
Collaborator

@JavierJF JavierJF commented Mar 4, 2021

Closes #3334.

…erly updating 'length' from copied last row after data copy
1. Isolated POC for ps_buffer into function.
2. Improved documentation of functions old and introduced checks.
3. Added new query used to trigger a memory error during testing.
@@ -220,7 +384,7 @@ int main(int argc, char** argv) {
// configure the connection as not blocking
diag("Setting mysql connection non blocking");
mysql_options(mysql, MYSQL_OPT_NONBLOCK, 0);
if (!mysql_real_connect(mysql, cl.host, cl.username, cl.password, NULL, cl.port, NULL, 0)) {
if (!mysql_real_connect(mysql, cl.host, cl.username, cl.password, NULL, 6033, NULL, 0)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should be reverted I believe

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yes, thanks you.

if (mysql_stmt_close(stmt2a)) {
fprintf(stderr, " failed while closing the statement\n");
ok(false, " %s\n", mysql_error(mysql));
restore_admin(mysql);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems incorrect

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, copy paste mistake I'm afraid.

fprintf(stderr, " failed while closing the statement\n");
ok(false, " %s\n", mysql_error(mysql));
return restore_admin(mysqladmin);
}
restore_admin(mysql);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems incorrect

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, same as previous one.

@renecannao renecannao merged commit 6de72f3 into v2.1.1 Mar 11, 2021
@renecannao renecannao deleted the v2.1.1-3334 branch June 4, 2021 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix crash and memory errors reported by valgrind for v2.1.1
2 participants