1 message in com.mysql.lists.perlDon't Forget to Flush?
FromSent OnAttachments
David Silva25 May 1999 21:05 
Subject:Don't Forget to Flush?
From:David Silva (dsi@manifold-id.com)
Date:05/25/1999 09:05:20 PM
List:com.mysql.lists.perl

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.