Don't call std::terminate on connection drop #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://bugs.mysql.com/bug.php?id=116569
If there is connection drop during executing the query, an exception is thrown from
cdk::mysqlx::Cursor::~Cursor()
orcdk::mysqlx::Stmt_op::~Stmt_op()
.note: in C++11 destructors default to ‘noexcept’ - that means it leads to call
std::terminate()
.NOTE:
Sess.connection_drop
test case may should be excluded since it usestc
+system
There might be several ways to reproduce the terminate.
killall -9 mysqld
mysqlx_write_timeout
seconds MySQL will close the connection.Using traffic control to force the packet loss +
mysqlx_write_timeout
can also introduce the infinite hang inTLS::Read_some_op::common_read()
orrecv_some()->poll_one()
, similar to https://bugs.mysql.com/bug.php?id=92325This MR introduces suggested fix to fix the terminate when the connection is closed.