[mythtv] [mythtv-commits] mythtv commit: r17160 - in trunk/mythtv/libs by danielk
Michael T. Dean
mtdean at thirdcontact.com
Sat May 3 23:27:57 UTC 2008
On 05/03/2008 03:40 PM, Michael T. Dean wrote:
> So, I did some experimentation and figured out what's going on.
> Although the default value for MythContext::GetSetting() is "", the
> default value for MythContext::GetNumSetting() is 0. And, when you
> factor in the settings cache, it turns out that whatever function is
> called first wins--so, if gContext.GetNumSetting("DBSchemaVer") is
> called first, all calls to gContext.GetSetting("DBSchemaVer") will return 0.
>
> Therefore, since the addition of CompareTVDatabaseSchemaVersion() in
> [15902], the schema version checks for "" have all been broken. (Yeah,
> that means I broke it. :( ).
OK, I did up some patches to clean up the mess I made. They're on #5286.
For the committer, the patches should be straightforward with one
exception--only ONE of
mythtv-5286-check_for_empty_or_zero_to_call_InitializeDatabase.patch or
mythtv-5286-use_IsNewDatabase_everywhere.patch should be applied. They
should apply in any order (as I didn't see any overlaps)--but I didn't
test all the combinations. :) (However, compiling
mythtv-5286-use_IsNewDatabase_everywhere.patch depends on
mythtv-5286-no_backup_for_new_database.patch .)
I recommend all of the patches be committed--that is all except one of
mythtv-5286-check_for_empty_or_zero_to_call_InitializeDatabase.patch or
mythtv-5286-use_IsNewDatabase_everywhere.patch . I prefer
mythtv-5286-use_IsNewDatabase_everywhere.patch , but I'll leave the
decision up to you (and, again, I'm happy to modify
DBUtil::IsNewDatabase() if you want).
Mike
More information about the mythtv-dev
mailing list