Hello,
  i'm attempting to install DBD::mysql onto a FreeBSD machine, but i do *not*
wish to run the mysql database on the machine.  I have a seperate machine that
has a working mysql installation and dbd::mysql on it.  I believe there is an
error in the Msql-Mysql-modules-1.2215/Makefile.PL script when the database to
be tested in the make test is not local.
  In installation the Msql-Mysql-modules-1.2215/Makefile.PL prompts for values
related to the database in QueryDb.  However, lines 111-114 assign the host
name to the dsn to be used:
    my $test_dsn = "DBI:$driver:database=$test_db";
    if ($test_host) {
        $cfg->{$driver}->{'test_dsn'} .= ";host=$test_host";
    }
But the value assigned to the configuration hash is on line 116
    $cfg->{'test_dsn'} = $test_dsn;

It seems that all tests executed then use this $cfg->{'test_dsn'} value which
does *not* contain the host addendum.  I am unsure why the host name is
assigned to the driver specific dsn.  You can see where mysql picks the dsn to
use in testing in Msql-Mysql-modules-1.2215/mysql/t/10dsnlist.t.  It connects
via the $test_dsn variable which is set in t/lib.pl on line 28.  This value is
the value deposited in the Config.pm file from the prompt issued in the
toplevel Makefile.PL.

So the change required to make this work more properly is this:
     my $test_dsn = "DBI:$driver:database=$test_db";
     if ($test_host) {-       $test_dsn .= ";host=$test_host";
+       $cfg->{$driver}->{'test_dsn'} .= ";host=$test_host";
     }

However, this does not seem to solve all the problems for a mysql only
installation.  the test t/dbdadmin.t seems to require running a db locally.  I
haven't solved this problem yet, but i wanted to see if anyone else has found
this problem, or if i am just deep in some weeds.

Has anyone else found this problem?  Or have i just gone off the edge?

thanks
dave
-- 
once you're married, you'll understand the importance of fresh produce.
    - tony soprano

Reply via email to