DBD-mysql
view release on metacpan or search on metacpan
lib/DBD/mysql.pm view on Meta::CPAN
},
'program_name' => {
'ATTR_VALUE' => './foo.pl',
'PROCESSLIST_ID' => '3',
'ATTR_NAME' => 'program_name',
'ORDINAL_POSITION' => '5'
},
'_client_name' => {
'ATTR_VALUE' => 'libmysql',
'PROCESSLIST_ID' => '3',
'ATTR_NAME' => '_client_name',
'ORDINAL_POSITION' => '1'
},
'_client_version' => {
'ATTR_VALUE' => '5.6.24',
'PROCESSLIST_ID' => '3',
'ATTR_NAME' => '_client_version',
'ORDINAL_POSITION' => '7'
},
'_os' => {
'ATTR_VALUE' => 'osx10.8',
'PROCESSLIST_ID' => '3',
'ATTR_NAME' => '_os',
'ORDINAL_POSITION' => '0'
},
'_pid' => {
'ATTR_VALUE' => '59860',
'PROCESSLIST_ID' => '3',
'ATTR_NAME' => '_pid',
'ORDINAL_POSITION' => '2'
},
'_platform' => {
'ATTR_VALUE' => 'x86_64',
'PROCESSLIST_ID' => '3',
'ATTR_NAME' => '_platform',
'ORDINAL_POSITION' => '4'
}
};
=back
=back
=head1 DATABASE HANDLES
The DBD::mysql driver supports the following attributes of database
handles (read only):
$errno = $dbh->{'mysql_errno'};
$error = $dbh->{'mysql_error'};
$info = $dbh->{'mysql_hostinfo'};
$info = $dbh->{'mysql_info'};
$insertid = $dbh->{'mysql_insertid'};
$info = $dbh->{'mysql_protoinfo'};
$info = $dbh->{'mysql_serverinfo'};
$info = $dbh->{'mysql_stat'};
$threadId = $dbh->{'mysql_thread_id'};
These correspond to mysql_errno(), mysql_error(), mysql_get_host_info(),
mysql_info(), mysql_insert_id(), mysql_get_proto_info(),
mysql_get_server_info(), mysql_stat() and mysql_thread_id(),
respectively.
=over 2
=item mysql_clientinfo
List information of the MySQL client library that DBD::mysql was built
against:
print "$dbh->{mysql_clientinfo}\n";
8.3.0
=item mysql_clientversion
print "$dbh->{mysql_clientversion}\n";
80300
=item mysql_serverversion
print "$dbh->{mysql_serverversion}\n";
80300
=item mysql_dbd_stats
$info_hashref = $dbh->{mysql_dbd_stats};
DBD::mysql keeps track of some statistics in the mysql_dbd_stats attribute.
The following stats are being maintained:
=over 8
=item auto_reconnects_ok
The number of times that DBD::mysql successfully reconnected to the mysql
server.
=item auto_reconnects_failed
The number of times that DBD::mysql tried to reconnect to mysql but failed.
=back
=back
The DBD::mysql driver also supports the following attributes of database
handles (read/write):
=over
=item mysql_auto_reconnect
This attribute determines whether DBD::mysql will automatically reconnect
to mysql if the connection be lost. This feature defaults to off; however,
if either the GATEWAY_INTERFACE or MOD_PERL environment variable is set,
DBD::mysql will turn mysql_auto_reconnect on. Setting mysql_auto_reconnect
to on is not advised if 'lock tables' is used because if DBD::mysql reconnect
to mysql all table locks will be lost. This attribute is ignored when
( run in 0.761 second using v1.01-cache-2.11-cpan-5735350b133 )