[mythtv] [mythtv-commits] mythtv commit: r17160 - in trunk/mythtv/libs by danielk

Michael T. Dean mtdean at thirdcontact.com
Tue Apr 29 16:01:34 UTC 2008


On 04/29/2008 09:48 AM, Daniel Kristjansson wrote:
> On Mon, 2008-04-28 at 20:32 -0400, Michael T. Dean wrote:
>   
>> Also, your change to not do the backup on an "empty" database (where 
>> dbver != "0") sounds good as long as dbVer doesn't get set to 0 if the 
>> settings table is missing or the DBSchemaVer setting, itself, happens to 
>> be gone from the DB (for the same reason Chris Pinkham reverted his 
>> change at http://svn.mythtv.org/trac/changeset/15933 , i.e. 
>> http://www.gossamer-threads.com/lists/mythtv/dev/315935#315935 ).
>>     
>
> I'll look into this.
>   

Actually, I think Nigel's idea of having DBUtil::BackupDB() check for no
tables is a good one.  It's a quick and easy change, so I can make a
patch for you (so don't waste your time on it :).  When I work on it,
I'll test out a couple of corrupted DB scenarios, and we can decide
whether to remove the check before the call to BackupDB().  It will be a
little bit (a week?) before I can switch over my dev system to post-Qt4
trunk, but as soon as I can, I'll do the patch.


>> And, finally, this adds a check for dbver != "0" before calling 
>> PromptForSchemaUpgrade(), but PromptForSchemaUpgrade() is also doing a 
>> check at libs/libmyth/mythcontext.cpp +3529 ( 
>> http://cvs.mythtv.org/trac/browser/trunk/mythtv/libs/libmyth/mythcontext.cpp#L3529 
>> ).  Since the "old" check--an isEmpty() check--is failing and (I'm 
>> assuming) yours is working, it seems that someone (I don't see where) is 
>> setting dbver to 0 before the call to PromptForSchemaUpgrade() (perhaps 
>> this changed since Nigel(?) first wrote it).  Does it make sense to 
>> remove the new check and fix the one in PromptForSchemaUpgrade()?
>>     
> It's probably best to check both. We could also modify the "empty
> database check" to check for the absence of tables. This is what I
> did in the datadirect portion of the patch.

Nigel may have a plan for this now.  He added in an = "0" check to
PromptForSchemaUpgrade() and I think he planned to make some changes
when he comes up with a plan for backups on mingw.  So, again, it may

Mike


More information about the mythtv-dev mailing list