[mythtv-users] Database internals

Paul Gardiner lists at glidos.net
Sat Jan 4 17:42:59 UTC 2014


On 04/01/2014 15:28, Gary Buhrmaster wrote:
> On Sat, Jan 4, 2014 at 8:36 AM, Paul Gardiner <lists at glidos.net> wrote:
> .....
>> The manual page says "For InnoDB tables
>
> I presume that you know that the MythTV tables default
> to (and are technically only supported as) with the
> MyISAM engine.... (*)

Oops! Misremembering a previous discussion concerning the
engine. Still, from what else I've read, it looks like
that comment from the manual was saying "even InnoDB, provided
--single-transaction is specified", with backups of MyISAM
not requiring the extra flag.

> One of the issues with MythTV's usage of
> MySQL is that it does not use transactions
> to insure referential integrity (and the business
> logic is in the code, not enforced in the DB).
> This can result in backups that appear to be
> valid, but are technically "corrupt" from the
> MythTV perspective (partial updates being
> backed up).

Okay. I think I'm getting the idea. mythbackend might
ensure that when a certain record is created in one table,
a corresponding one is created in another table. mysqldump
runs inbetween the two creations and picks up only one
of the records. Another part of mythbackend assumes
the correspondence and the missing record causes a crash
(or something worse). I'd imagine that sort of
inconsistency could also arise from an unclean shutdown
of mythbackend. Or mythfrontend... that's worrying: my
frontend is diskless, and I just turn it off at the
power switch. Maybe I've misunderstood what you are
saying.

> Gary
>
> (*) Some individuals have reportedly changed to
> InnoDB tables, and have had success(**), but there
> are a couple of cases where there is the possibility
> of problems (I do not recall them at the moment, but
> I remember identifying them at one point).  Some day,
> perhaps when a DB engine gets integrated into the
> MythTV base, those issues might be moot..
>
> (**) Full disclosure, I am one of them(***), so my
> MythTV installation is now unsupported by the
> project, following the rule "You break it, you own
> it", I, technically, have broken it.
>
> (***) Since I have done DBA duties in past
> roles, I have my own opinion regarding DB
> configurations.


More information about the mythtv-users mailing list