When I hit enter on "n" the machine goes into deep kernel space CPU usage and
never comes back.
Single stepping through the code takes me to line 666 of
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/DBI.pm.
(near the very end of sub connect())
665
666 my $dbh = &$connect_closure(undef, undef);
667
668 $dbh->{dbi_connect_closure} = $connect_closure if $dbh;
669
670 return $dbh;
671 }
672
673
674 sub disconnect_all {
single stepping (once) into the closure, and then next'ing gets me to a line
598, where I inspect $dsn, $user, $pass, $attr:
DB<3> x $dsn, $user, $pass, $attr
0 'database=foo;host=www.foo.com'
1 'fooadmin'
2 'foo'
3 HASH(0x990f47c)
'AutoCommit' => 1
'PrintError' => 1
'Username' => 'fooadmin'
This should connect, but at line 605, $errstr:
Unknown MySQL server host \'host=www.foo.com\' (1)'
If I change dsn to 'host=www.foo.com;database=foo' it will complain
0 'Unknown database \'database=foo\''
I have 10 other apps that are using the same config file and the same layer
that calls the same DBI->connect, but they all work.
Any ideas?
My Code:
DB<5> DBI->connect( "DBI:mysql:database=foo;host=www.foo.com", "fooadmin", "foo")
DB<6> l
316==> $self->{'_handle'} = DBI->connect( "DBI:mysql:database=$self->{'_db_name'};host=$self->{'_db_host'}", "$self->{'_db_user'}", "$self->{'_db_pass'}");
317
318 }
319
320 #=====================================================================
321 # package entry
322 #=====================================================================
323
324 {
325: $gNumber::DB::singleton = undef;
DB<6> x "DBI:mysql:database=$self->{'_db_name'};host=$self->{'_db_host'}", "$self->{'_db_user'}", "$self->{'_db_pass'}"
0 'DBI:mysql:database=foo;host=www.foo.com'
1 'fooadmin'
2 'foo'
DB<7> n