Subject: | MySQL index name quoting |
Date: | Wed, 31 Mar 2010 12:46:00 -0500 |
To: | bug-SQL-Translator [...] rt.cpan.org |
From: | Andy Clayton <clayton [...] physics.umn.edu> |
Hello,
It seems that for MySQL when producing INDEX schema, the index names are
not appropriately quoted. I believe the attached patch should fix this.
Thank you,
-Andy
Index: MySQL.pm
===================================================================
--- MySQL.pm (revision 1414)
+++ MySQL.pm (revision 1415)
@@ -629,10 +629,10 @@
lc $index->type eq 'normal' ? 'INDEX' : $index->type . ' INDEX',
$index->name
? (
- truncate_id_uniquely(
+ $qf . truncate_id_uniquely(
$index->name,
$options->{max_id_length} || $DEFAULT_MAX_ID_LENGTH
- )
+ ) . $qf
)
: '',
'(' . $qf . join( "$qf, $qf", $index->fields ) . $qf . ')'