[mythtv-commits] Ticket #5314: Use GetSetting() to retrieve DBSchemaVer
MythTV
mythtv at cvs.mythtv.org
Sun May 4 23:57:44 UTC 2008
#5314: Use GetSetting() to retrieve DBSchemaVer
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean at thirdcontact.com> | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: 0.21-fixes
Severity: medium | Mlocked: 0
----------------------------------------------+-----------------------------
The attached patch modifies CompareTVDatabaseSchemaVersion() to use
GetSetting() rather than GetNumSetting() to retrieve DBSchemaVer.
The patch should be applied against both 0.21-fixes and trunk. I
tested/verified it with both.
When applied to 0.21-fixes, it will prevent the change to the default
value of DBSchemaVer mentioned in #5286, so even without [17165] and
[17166], the check for an "empty" DB in PromptForSchemaUpgrade() would
succeed after this patch.
Note that even with the change of default value for DBSchemaVer, the check
'if (dbver == "")' in doUpgradeTVDatabaseSchema() will always succeed as
the settings cache is deactivated before the call to
UpgradeTVDatabaseSchema() by main.cpp in mythtv-setup, mythbackend, and
mythfrontend (so doUpgradeTVDatabaseSchema() will get the default it
specifies when the value is not found in the database).
Therefore, no behavior will change as a result of this patch (with the
exception of a change to the log output from "Current Schema Version: 0"
to "Current Schema Version: "). Both before and after this patch, Myth
was able to properly initialize the database schema.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/5314>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list