mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 301901: Index rename failure when renaming an index called PRIMARY
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=justdave, a=justdave
This commit is contained in:
parent
64bfdc420e
commit
6b16ef1ad2
@ -184,6 +184,9 @@ sub get_rename_indexes_ddl {
|
||||
my $type = $indexes{$old_name}->{TYPE};
|
||||
$type ||= 'INDEX';
|
||||
my $fields = join(',', @{$indexes{$old_name}->{FIELDS}});
|
||||
# $old_name needs to be escaped, sometimes, because it was
|
||||
# a reserved word.
|
||||
$old_name = '`' . $old_name . '`';
|
||||
$sql .= " ADD $type $name ($fields), DROP INDEX $old_name,";
|
||||
}
|
||||
# Remove the last comma.
|
||||
|
Loading…
Reference in New Issue
Block a user