[mythtv] [mythtv-commits] mythtv commit: r17875 by nigel

Michael T. Dean mtdean at thirdcontact.com
Tue Jul 29 07:42:47 UTC 2008

On 07/29/2008 02:31 AM, Nigel Pearson wrote:

>  Mike, thanks for the extra eyes on my bad coding!

I wouldn't say bad coding.  You just didn't know what I was thinking 
when I wrote the DBMS version check. :)

> > The MINIMUM_DBMS_VERSION* is a runtime requirement, so we do need
> > to do the DBMS version check even if we're not upgrading the DB.
>  OK. We could add something like SchemaUpgradeWizard::CheckDMBSver(),
>  but its probably easier to check the version whenever a
>  SchemaUpgradeWizard is created?
>  Note that some programs (e.g. mythcommflag) don't actually try to
>  upgrade the schema, so it won't be foolproof, but I don't think
>  adding more checks into MythContext::Init() is helpful.

Warning:  3:30am thinking below.

Assumption #1: Each MythTV system has only one database and, therefore, 
one DBMS.
Assumption #2: Each MythTV system that runs a backend has a master backend.

Therefore, if the master backend checks the DBMS version and there's a 
running master backend, the DBMS version check has already succeeded, so 
a successful gContext->ConnectToMasterServer() makes the DBMS version 
check unnecessary.

Therefore, we could do the DBMS version check if 
gContext->IsMasterBackend() (but not for --printsched or --testsched or 
--resched or --upnprebuild or --printexpire or --clearcache or 
--generate-preview ).

Then, any additional backends or frontends or other clients can first 
attempt to verify the version check is completed by successfully 
contacting the MBE.  If a client is allowed to run without a backend and 
is unable to contact the MBE (i.e. for a frontend in use for plugins 
only), the client could do the DBMS version check itself.

It's way too late for me to figure out where to fit this in, or even 
whether it would make things easier (or much harder), but I'll give it 
some more thought tomorrow.


More information about the mythtv-dev mailing list