I have a couple of suggested patches for DBD::mysql. These patches were based
upon
DBD-mysql-2.9006.
The first patch is to correct a typo in "t/lib.pl".
47c47
< $::test_password = $::test_passowrd || $ENV{'DBI_PASS'} || '';
---
> $::test_password = $::test_password || $ENV{'DBI_PASS'} || '';
The second patch is a change to Makefile.PL so that is creates a modified
"t/mysql.mtest".
129c129
< "\$::test_user = \$opt->{'testuser'};\n" .
---
> "\$::test_user = \$opt->{'testuser'} if \$opt->{'testuser'};\n" .
131c131
< "\$::test_password = \$opt->{'testpassword'};\n" .
---
> "\$::test_password = \$opt->{'testpassword'} if
> \$opt->{'testpassword'};\n" .
133,135c133,135
< "\$::test_dsn = \"DBI:mysql:\$::test_db\";\n" .
< "\$::test_dsn .= \":\$::test_host\" if \$::test_host;\n" .
< "\$::test_dsn .= \":\$::test_port\" if \$::test_port;\n" .
---
> "\$::test_dsn = \"DBI:mysql:\$::test_db\" if \$::test_db;\n" .
> "\$::test_dsn .= \":\$::test_host\" if \$::test_host &&
> \$::test_db;\n" .
> "\$::test_dsn .= \":\$::test_port\" if \$::test_port &&
> \$::test_db;\n" .
With these two patches, you can use environment variables DBI_USER, DBI_PASS,
and
DBI_DSN to pass the test username, test password, and test hostname needed
during
"make test". Without these changes, the "t/mysql.mtest" that is created
overwrites the
values obtained from the environment variables. If the default values (null
user, null
password, and localhost) are not correct, this forces the installer to specify
these values
on the "perl Makefile" command line. The values are then written to
"t/mysql.mtest".
The test hostname does not worry me, but I do not like to leave the test
username and
test password lying around in a file. This seems like a security problem
waiting to happen.
--
James D. White ([EMAIL PROTECTED])
Director of Bioinformatics
Department of Chemistry and Biochemistry/ACGT
University of Oklahoma
101 David L. Boren Blvd., SRTC 2100
Norman, OK 73019
Phone: (405) 325-4912, FAX: (405) 325-7762