update MySQL Impl

This commit is contained in:
XieHan
2021-09-15 19:21:55 +08:00
parent f73ea7cb0a
commit 7770bb1eda
+8 -2
View File
@@ -250,12 +250,11 @@ CommMessageOut *ComplexMySQLTask::message_out()
auto *target = (RouteManager::RouteTarget *)this->get_target();
/* If it's a transaction task, generate a ECONNRESET error when
* the target is reconnected. */
* the target was reconnected. */
if (seqid <= 3 && (seqid == 2 || res_charset_.size() != 0))
{
if (target->state)
{
target->state = 0;
errno = ECONNRESET;
return NULL;
}
@@ -604,6 +603,13 @@ bool ComplexMySQLTask::finish_once()
return false;
}
if (this->is_fixed_addr() && this->state != WFT_STATE_SUCCESS)
{
auto *target = (RouteManager::RouteTarget *)this->get_target();
if (target)
target->state = 0;
}
return true;
}