[mythtv-commits] Ticket #5286: Fix initial database creation

MythTV mythtv at cvs.mythtv.org
Sat May 3 22:55:06 UTC 2008


#5286: Fix initial database creation
----------------------------------------------+-----------------------------
 Reporter:  sphery <mtdean at thirdcontact.com>  |        Owner:  ijr    
     Type:  patch                             |       Status:  new    
 Priority:  minor                             |    Milestone:  unknown
Component:  mythtv                            |      Version:  head   
 Severity:  medium                            |   Resolution:         
  Mlocked:  0                                 |  
----------------------------------------------+-----------------------------

Comment(by sphery <mtdean at thirdcontact.com>):

 mythtv-5286-use_IsNewDatabase_everywhere.patch can be used instead of
 mythtv-5286-check_for_empty_or_zero_to_call_InitializeDatabase.patch .  It
 replaces the DBSchemaVer checks that are being used as a simple "new
 database" check in doUpgradeTVDatabaseSchema() and
 MythContext::PromptForSchemaUpgrade() with calls to
 DBUtil::IsNewDatabase().  This approach is more robust than simply
 checking DBSchemaVer since the setting could be missing in a corrupt
 database (i.e. user accidentally deleted the setting or the settings table
 or the settings table is crashed).

 However, if used, the next patch (which prevents an unknown DBSchemaVer
 from successfully completing doUpgradeTVDatabaseSchema()) becomes
 critical.

 Performance is not an issue (though I'm still happy to modify
 IsNewDatabase()) since IsNewDatabase() is only called 3 times and only if
 a schema upgrade is occurring.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5286#comment:4>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list