fix: inner 645 and add log

auth switch request should use mysql_native_password
This commit is contained in:
guoaomen
2020-10-29 16:56:32 +08:00
parent 539cd318f1
commit 2f7f5eac72
3 changed files with 12 additions and 1 deletions

View File

@@ -99,6 +99,9 @@ public class XACommitFailStage extends XACommitStage {
} else {
String xaTxId = service.getConnXID(session.getSessionXaID(), rrn.getMultiplexNum().longValue());
XaDelayProvider.delayBeforeXaCommit(rrn.getName(), xaTxId);
if (logger.isDebugEnabled()) {
logger.debug("XA COMMIT " + xaTxId + " to " + service);
}
newService.execCmd("XA COMMIT " + xaTxId);
}
}

View File

@@ -149,6 +149,7 @@ public class ManagerQueryHandler {
}
} catch (Exception e) {
service.writeErrMessage(ErrorCode.ER_YES, "get error call manager command " + e.getMessage());
LOGGER.warn("unknown error:", e);
}
}

View File

@@ -17,6 +17,8 @@ import com.actiontech.dble.services.factorys.BusinessServiceFactory;
import com.actiontech.dble.services.mysqlauthenticate.util.AuthUtil;
import com.actiontech.dble.singleton.TraceManager;
import com.actiontech.dble.util.RandomUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
@@ -26,6 +28,8 @@ import java.io.IOException;
*/
public class MySQLFrontAuthService extends AuthService {
private static final Logger LOGGER = LoggerFactory.getLogger(MySQLFrontAuthService.class);
private volatile AuthPacket authPacket;
public MySQLFrontAuthService(AbstractConnection connection) {
@@ -143,8 +147,11 @@ public class MySQLFrontAuthService extends AuthService {
try {
PluginName name = PluginName.valueOf(auth.getAuthPlugin());
if (pluginName != name) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("auth switch request client-plugin:[{}],server-plugin:[{}]->[{}]", name, pluginName, PluginName.mysql_native_password);
}
needAuthSwitched = true;
this.pluginName = name;
this.pluginName = PluginName.mysql_native_password;
sendSwitchPacket(pluginName);
return;
}