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 4862018b8ab5b5333f6b9d0fb6799ac03e00f38e..01f799b4e8eb6d09b347148bcdf19c404ababdf2 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));