Skip to content

Commit

Permalink
reset cached client plugin when it's no longer needed
Browse files Browse the repository at this point in the history
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()
  • Loading branch information
vuvova authored and abarkov committed Apr 18, 2024
1 parent fd247cc commit 901cb2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sql/sql_acl.cc
Expand Up @@ -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);
Expand Down

0 comments on commit 901cb2a

Please sign in to comment.