[mythtv-users] DB Schema update 1261: broken duplicate detection with historic non-DD data

Nick Morrott knowledgejunkie at gmail.com
Wed Apr 22 01:01:21 UTC 2015


On 21 April 2015 at 14:43, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> On 04/21/2015 09:37 AM, Michael T. Dean wrote:
>>
>> So is there some way you corrupted your database and removed that setting?
>> I.e. if you don't properly restore the database--and do something broken,
>> like restoring only certain tables (where doing so is not only broken, but
>> out-right dangerous if the database version isn't correct/up-to-date) to
>> "clean up" the database--you could end up running that code again, even
>> though it was already run in 2007.  Similarly, if you "cleaned up" the
>> database by removing old settings values that you thought you didn't need,
>> you could end up running that code again.

Further investigation this evening, digging in the code and re-running
the DB upgrade from 0.21-fixes seems to have revealed the problem.

Like others faced with the prospect of an intermediate upgrade before
being able to install 0.27, I used a VM host (running Debian Squeeze
and MythTV 0.24 in this case) to speed things along.

The VM host had a different hostname to that configured in the
database for the system being upgraded, so I opted to use the
<LocalHostName> option in config.xml to "correct" the hostname prior
to the upgrade.

My error was that I quickly checked my 0.27 install for the location
of the config option (my old config.xml did not contain any hints
about it - maybe I removed it years ago or maybe it was never added?).
Only the format of config.xml was changed after 0.24. And you can
guess the rest...

As a result of the erroneous LocalHostName override, mythtv-setup
found an empty LocaHostName and defaulted to the hostname of the VM,
which obviously didn't contain a valid setting for
MythFillFixProgramIDsHasRunOnce, so the test in the 1261 schema
upgrade failed and the programid updates were run.

I'm wondering why this particular setting is associated with a given
hostname, as it would seem to me to be something that makes more sense
on an installation-wide basis, rather than per-host. It clearly caught
me out though and thankfully was very easy to reverse once I'd worked
out what was going on.

My apologies and thanks to sphery, and to the list for the unwarranted
noise in this case.

Cheers,
Nick


More information about the mythtv-users mailing list