From 901cb2aa2fd35a53bde848a78ff1c37d68848c5b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 17 Mar 2024 15:00:09 +0100 Subject: [PATCH] reset cached client plugin when it's no longer needed it's a pointer into the net buffer, so it might be overwritten by the next read or write. And the next plugin switch (in multi-auth) will try to compare it (in send_plugin_request_packet) which is normally harmless but fails the assert with Lex_ident::is_valid_ident() --- sql/sql_acl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 51885cc4c16..7fb4fa1d476 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -14230,6 +14230,7 @@ static int server_mpvio_write_packet(MYSQL_PLUGIN_VIO *param, res= my_net_write(&mpvio->auth_info.thd->net, packet, packet_len) || net_flush(&mpvio->auth_info.thd->net); } + mpvio->cached_client_reply.plugin= ""_LEX_CSTRING; mpvio->status= MPVIO_EXT::FAILURE; // the status is no longer RESTART mpvio->packets_written++; DBUG_RETURN(res);