-
Notifications
You must be signed in to change notification settings - Fork 977
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
Conversation
…last row from MySQL_STMT::result
…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.
test/tap/tests/test_ps_async-t.cpp
Outdated
@@ -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)) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, yes, thanks you.
test/tap/tests/test_ps_async-t.cpp
Outdated
if (mysql_stmt_close(stmt2a)) { | ||
fprintf(stderr, " failed while closing the statement\n"); | ||
ok(false, " %s\n", mysql_error(mysql)); | ||
restore_admin(mysql); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems incorrect
There was a problem hiding this comment.
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.
test/tap/tests/test_ps_async-t.cpp
Outdated
fprintf(stderr, " failed while closing the statement\n"); | ||
ok(false, " %s\n", mysql_error(mysql)); | ||
return restore_admin(mysqladmin); | ||
} | ||
restore_admin(mysql); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems incorrect
There was a problem hiding this comment.
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.
…ction handler on 'restore_admin'
Closes #3334.