From e01a5ca8aeaa18118bbe6268e75deada7a47b51f Mon Sep 17 00:00:00 2001 From: Xie Han <63350856@qq.com> Date: Fri, 8 Sep 2023 16:40:56 +0800 Subject: [PATCH] Fix MySQL connection crash. --- src/factory/MySQLTaskImpl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/factory/MySQLTaskImpl.cc b/src/factory/MySQLTaskImpl.cc index 2c74fe11f7..0825cebbd0 100644 --- a/src/factory/MySQLTaskImpl.cc +++ b/src/factory/MySQLTaskImpl.cc @@ -744,9 +744,9 @@ bool ComplexMySQLTask::finish_once() { if (this->state != WFT_STATE_SUCCESS || this->keep_alive_timeo == 0) { - auto *target = (RouteManager::RouteTarget *)this->get_target(); + CommTarget *target = this->get_target(); if (target) - target->state = 0; + ((RouteManager::RouteTarget *)target)->state = 0; } }