From 1a623b67fdd752bb518063f5731ea20bce3b2af4 Mon Sep 17 00:00:00 2001 From: wgs13579 Date: Tue, 1 Jun 2021 10:09:48 +0800 Subject: [PATCH] fix sharding connect failed when enable_proxy_scramble=true --- src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp b/src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp index 4862018..01f799b 100644 --- a/src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp +++ b/src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp @@ -220,11 +220,8 @@ int ObProxySessionInfoHandler::rewrite_login_req_by_sharding(ObClientSessionInfo LOG_WARN("fail to encrypt_passwd_to_stage1", K(ret)); } else { passwd_string += 1; - OMPKHandshake handshake; int64_t actual_len = 0; - char scramble_buf[SCRAMBLE_LENGTH + 1] = {0}; - handshake.get_scramble(scramble_buf, SCRAMBLE_LENGTH + 1, actual_len); - ObString scramble_string(actual_len, scramble_buf); + const ObString &scramble_string = client_info.get_scramble_string(); if (OB_FAIL(ObClientUtils::get_auth_password_from_stage1(passwd_string, scramble_string, pwd_buf, pwd_buf_len, actual_len))) { LOG_WARN("fail to get get_auth_password_from_stage1", K(ret)); -- GitLab