fix UNIQUE key detection to include all documented ways in ALTER TABLE

This commit is contained in:
Kenny Gryp
2017-06-27 15:00:05 -07:00
parent 719370d679
commit b356634279

View File

@@ -10053,7 +10053,7 @@ sub get_unique_index_fields {
$clean .= $suffix;
my $fields = [];
my $fields_re = qr/UNIQUE\s*INDEX\s*(?:.*?)* \((.*?)\)/i;
my $fields_re = qr/UNIQUE\s*(INDEX|KEY|)\s*(?:.*?)* \((.*?)\)/i;
while($clean =~ /$fields_re/g) {
push @$fields, [ split /\s*,\s*/, $1 ];