List:MySQL and Perl« Previous MessageNext Message »
From:David Silva Date:May 26 1999 4:05am
Subject:Don't Forget to Flush?
View as plain text  
I'm using mSQL with msql-perl and run into a strange problem anytime the 
server (meaning, in this case, the whole machine) crashes or is restarted.
Namely, all new data, updates, etc., vanish and only old, obsolete data is
in the database. Someone told me I had to be sure to "flush" the output,
otherwise nothing would actually be written to the hard disk.

So, I added a line like system('sync') to my Perl code, following inserts,
updates and deletes. Unfortunately, after a recent restart I discovered that
that didn't do the flushing I needed (assuming that was the problem).

Now I've read that if you put $|=1 then autoflush is set -- and that should
take care of everything. I put this in my code but since the server hasn't
gone down, I don't know for sure if I've fixed the problem.

I'm grateful for any help.
David Silva
Manifold Information Design

Don't Forget to Flush?David Silva26 May