From: Stewart Smith Date: May 5 2010 2:09am Subject: Re: error handling for MySQL binary log List-Archive: http://lists.mysql.com/internals/37900 Message-Id: <87ocgvcd6g.fsf@willster.local.flamingspork.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Tue, 04 May 2010 16:32:41 +0200, Kristian Nielsen wrote: > While working on the binlog code in sql/log.cc, I discovered what I think is a > number of problems with the error handling in the code that writes events to > the binary log. At this point I do not have much in the way of concrete > suggestions for how to improve this (sorry!), but I thought it might be useful > to at least mention the issues, rather than just ignore it and let it be > forgotten until someone else hits the same issues (and maybe someone can > correct me if I misunderstood the code). This doesn't surprise me at all. As Mark mentioned, warn_unused_result is rather useful for finding these things. Actually failing them and testing... amazing (something only NDB ever got right in the MySQL source tree). I've been toying with the idea of having a VM that is able to fork() itself to test a bunch of these IO errors by just on each IO op, forking the whole VM and have one succeed and one fail. Idea being that fail code paths should clean up pretty quickly. thoughts? -- Stewart Smith