small bug in regex

This commit is contained in:
Marco Tusa
2023-09-22 17:32:27 +02:00
parent b9be38d3a0
commit b9675c56b6

View File

@@ -2067,7 +2067,7 @@ sub main {
$create =~ s{ BY }{ AS };
if ( $create =~ m/caching_sha2_password/ ) {
print "-- Converting $user_host caching_sha2_password to binary for correct export/import\n";
$create =~ s/\sAS\s.*'\s|$/ AS $pw_bin /g;
$create =~ s/\sAS\s.*'\s/ AS $pw_bin /g;
}
$alter =~ s{CREATE USER}{ALTER USER};
# Alter user should not be pass in the latest MySQL version