[mythtv] mythtv commit: r15901 - in trunk/mythtv/libs by cpinkham

Nigel Pearson nigel at ind.tansu.com.au
Tue Feb 12 01:32:59 UTC 2008

>> needlessly doing a backup
>> (e.g. user selects "Use Existing Schema" or Exit,
>>   or DB schema is newer than the connecting client?)
> I think that in these cases, we want to make sure there was a
> backup.  If the user is running a program that expects a newer or
> older DB version than the current one, we have no guarantee what
> corruption may or may not occur.

Very true. And I was amazed how fast a Mac OS X
remote backup actually was. Four seconds at home
(26MB dump from MySQL 4.0.22, 5.1MB gzipped),
less than one second on my work test rig!

Doing an un-needed backup if the user selects Exit
isn't really a problem - its just disk space.
It is more the confusing message in the 2nd popup.

I'm thinking that the caller of PromptForSchemaUpgrade()
should do:

1) PromptForSchemaUpgrade(v1, v2)
if the caller hasn't attempted a backup,
and the existing popup messages are used

2) PromptForSchemaUpgrade(v1, v2, "failed")
if the backup failed,
add "Unable to backup your database ..."
in the first popup, and remove the second

3) (optional)
PromptForSchemaUpgrade(v1, v2, backupPathname)
if the backup succeeded in that pathname,
which would change the second popup to

"If your system becomes unstable,
a database backup is in /..."


P.S. I just realised that, if the database is empty
(i.e. dvber == ""), then a backup is also done.

Nigel Pearson, nigel at ind.tansu.com.au|"People say I'm strange,
Telstra Net. Eng., Sydney, Australia | does it make me a stranger?
Office: 9202 3900    Fax:  9261 3912 | My best friend was born...
Mobile: 0408 664435  Home: 9792 6998 |     in a manger"   -DC Talk

More information about the mythtv-dev mailing list