[mythtv] mysql 5 bug affecting mythtv

Daniel Kristjansson danielk at cuymedia.net
Thu Jan 31 16:36:23 UTC 2008


On Thu, 2008-01-31 at 14:39 +0000, Colin Guthrie wrote:
> Dan Wilga wrote:
> > At 2:09 PM -0800 1/30/08, Rob Smith wrote:
> >> As for the mysql binary logs, that's done because mysql recommends and
> >> defaults to having binlogs enabled. I personally think not having
> >> binlogs is encouraging a foot shooting.
> > 
> > IMHO, the only reason you would want to turn binary logs on is if you 
> > are intending to use the replication or cluster features of MySQL. 
> > Otherwise, all you're doing is eating up lots of disk space and a 
> > non-trivial amount of CPU cycles.
> > 
> > There is little benefit in keeping binlogs as a form of backup, 
> > because on a busy system it would be very difficult to figure out 
> > exactly where to start playing them back in order to recreate a 
> > working system. They would have to be exactly synchronized with the 
> > most recent file-based (mysqlhotcopy or equivalent) backup.
> 
> I find binlogs pretty useful in terms of a backup TBH.
> 
> Every night I flush the logs, close all the db tables and take an LVM
> snapshot of the database partition and back it up to a separate disk.
> This is very quick to do, doesn't interrupt the service (much) and is
> very quick to restore from too. Every hour I flush the binary logs and
> copy them to a separate disk. That way even with a hideous server crash
> the worst case scenario is 1 hour of data loss. The good thing with
> snapshots is that it prevents the whole problem of backing up
> non-transactional tables such as MyISAM.
> 
> A replicated slave server would be better but if you can't justify the
> expense of that, this is a pretty good system.

I disagree with the idea of having binlogs turned on by default, but
the real problem was that they were not being rotated when Gentoo
first introduced this default so they quickly filled up the var
partition leading to data loss (the data loss on a full filesystem
itself is arguably a mysql bug). I believe they are now rotated,
but I'm not sure since I turn off binary logging immediately on my
one remaining Gentoo box. The 'debug' problem happened because I began
running Gentoo on my development box because I could easily make debug
builds of everything, so I always have the debug use flag set, on the
expectation that "-g" will be used whenever this doesn't mess up the
build (some packages can't be compiled with debugging.) But whoever
made the mysql ebuild decided to use the generic 'debug' flag to enable
a  'mysql debug build' which creates a special build that is known to
crash pretty much as soon as you connect to it on the Linux, OSX and
AIX operating systems; instead they should have used a new flag like
"mysqldebug" so if someone really wanted this very specialized build
they could still enable it, but it wouldn't hurt everyone who just
wanted the more useful core files that debug normally produces.

But even on other distros such as Ubuntu, Mandriva and Fedora I find
that if the packaged version of an application doesn't work, compiling
that application from source usually fixes the problem. So I don't mean
to single Gentoo out, except to note that I've had two problems with
the mysql build in the past. I don't particularly like the mythtv
packages used by any of the distro's. Ubuntu's is probably my favorite
since they moved to using the profile target + stripping, but it doesn't
turn on rtc for better playback when OpenGL V-Sync isn't available.
The Gentoo ebuild's biggest sin is that there are some dangerous USE
flags and the only warning you get scrolls by quickly as you build all
your packages. This is not a general problem with the warnings issued by
the Gentoo packages, they are buried in trivial status output from the
compile process itself unless you install each packages manually and
don't use the nifty dependency resolving features of the ports system.

We're getting way off topic here, so I'll stop responding unless this
thread is moved over to the user's mailing list. Just to summarize, I
highly recommend rebuilding mysql & mythtv by reading the build guides
and using "./configure --help" and without ebuild assistance.
 
-- Daniel



More information about the mythtv-dev mailing list