bug-1402776 Updated all modules using MySQLProtocolParser

This commit is contained in:
Carlos Salguero
2016-06-13 16:03:35 -03:00
parent 1ccfce176d
commit 70dc26a7b7
2 changed files with 3 additions and 6 deletions

View File

@@ -4706,14 +4706,11 @@ sub parse_client_handshake_packet {
return;
}
my $code_len = hex($buff_len);
# The (.*?)00.?\Z part in the regex, is to remove an erroneous
# null char + mysql_native_password after the db name
# https://bugs.launchpad.net/percona-toolkit/+bug/1402776
my $code_len = hex($buff_len);
my ( $db ) = $data =~ m!
^.{64}${user}00.. # Everything matched before
(?:..){$code_len} # The scramble buffer
(.*?)00.*\Z # The database name
(.*)00.*\Z # The database name
!x;
my $pkt = {
user => to_string($user),

View File

@@ -8722,7 +8722,7 @@ sub parse_client_handshake_packet {
my ( $db ) = $data =~ m!
^.{64}${user}00.. # Everything matched before
(?:..){$code_len} # The scramble buffer
(.*)00\Z # The database name
(.*)00.*\Z # The database name
!x;
my $pkt = {
user => to_string($user),