mirror of
https://github.com/actiontech/dble.git
synced 2026-01-02 02:40:28 -06:00
fix: inner 645 and add log
auth switch request should use mysql_native_password
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user