I am researching a production support issue we are having.
I found this function:
sub _connect
{
my $self = shift;
my $mysql;
if ($self->{hostname}) {
printf "Use INET Socket: %s %d/tcp\n", $self->{hostname}, $self->{port}
if $self->debug;
$mysql = IO::Socket::INET->new(
PeerAddr => $self->{hostname},
PeerPort => $self->{port},
Proto => 'tcp',
Timeout => $self->{timeout} || 60,
) or croak "Couldn't connect to $self->{hostname}:$self->{port}/tcp: $@";
}
else {
printf "Use UNIX Socket: %s\n", $self->{unixsocket} if $self->debug;
$mysql = IO::Socket::UNIX->new(
Type => SOCK_STREAM,
Peer => $self->{unixsocket},
) or croak "Couldn't connect to $self->{unixsocket}: $@";
}
$mysql->autoflush(1);
$self->{socket} = $mysql;
}
Here:
http://kobesearch.cpan.org/htdocs/Net-MySQL/Net/MySQL.pm.html
I am wondering if someone can clarify what the autoflush parameter being set will do??
Is this the same type of flushing mechanism as is used in File I/O??
Does it mean for every insert/update/delete the perl client will attempt to flush the change to disk?
Thanks,
Shawn