Subject: | mysql DSN hostname syntax not supported |
Class::DBI::Loader-0.22, perl v5.8.6 and perl v5.8.0. Linux 2.4 and 2.6
When starting Loader with a dsn="dbi:mysql:dbname:hostname.com", I get the following errors:
Couldn't load tables "DBD::mysql::st execute failed: You have an error in your SQL syntax near ':hostname.com LIKE 'Environment'' at line 1 [for Statement "SHOW TABLE STATUS FROM dbname:hostname.com LIKE 'Environment'"]
Clearly dbname is not correctly parsed out of the DSN - the error must be in _relationships at "$dsn =~ m/\Adbi:\w+(?:\(.*?\))?:(.+)\z/i"
Perhaps adding an optional hostname to the regexp would work:
"$dsn =~ m/\Adbi:\w+(?:\(.*?\))?:(.+)(?:\:.*?)\z/i"