MySQL Forums
Forum List  »  Perl

Perl MySQL autoflush
Posted by: Shawn Taylor
Date: October 27, 2010 03:00PM

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

Options: ReplyQuote


Subject
Written By
Posted
Perl MySQL autoflush
October 27, 2010 03:00PM
November 02, 2010 01:38PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.