That show processlist in mysql> was very useful.
I confirmed that $dbh->disconnect(); indeed does work to close a global $dbh
Also a global connection variable will still pass if(!$dbh) will still pass as connected even though using disconnect on it.
So ether non-global with 'my' or disconnect at end, will disconnect it.
I guess question I have, for global_player.pl should I just make 1 global connect when player zones in, and disconnect it when player zones out? Instead of always making new connects each time we get something from DB?
|