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

Nigel Pearson nigel at ind.tansu.com.au
Tue Apr 29 01:46:45 UTC 2008


> 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).


I'm not getting a 0. Just created a new empty DB,
and the schema version is empty:


% MythBackend.app/Contents/MacOS/MythBackend --version
Please include all output in bug reports.
MythTV Version   : 17091:17131M
MythTV Branch    : trunk
Library API      : 0.22.20080422-1
Network Protocol : 40
QT Version       : 4.3.4
...

% MythBackend.app/Contents/MacOS/MythBackend
2008-04-29 11:41:30.028 Using runtime prefix = /Volumes/MythBuild/ 
MythBackend.app/Contents/Resources, libdir = /Volumes/MythBuild/.osx- 
packager/build/lib
2008-04-29 11:41:30.029 Using localhost value of  
macaque.ind.tansu.com.au
2008-04-29 11:41:30.031 New DB connection, total: 1
2008-04-29 11:41:30.034 Connected to database 'mythtest' at host:  
149.135.128.77
2008-04-29 11:41:30.034 Closing DB connection named 'DBManager0'
2008-04-29 11:41:30.036 Connected to database 'mythtest' at host:  
149.135.128.77
2008-04-29 11:41:30.041 New DB connection, total: 2
2008-04-29 11:41:30.042 Connected to database 'mythtest' at host:  
149.135.128.77
2008-04-29 11:41:30.045 Current Schema Version:
2008-04-29 11:41:30.046 DataDirectProcessor::FixProgramIDs() -- begin
...
2008-04-29 11:41:30.100 No current database version. Auto upgrading
2008-04-29 11:41:30.101 Newest Schema Version : 1219
2008-04-29 11:41:30.104 Inserting MythTV initial database information.
2008-04-29 11:41:30.104 Upgrading to schema version 1112
2008-04-29 11:41:30.231 New DB connection, total: 4
2008-04-29 11:41:30.233 Connected to database 'mythtest' at host:  
149.135.128.77
2008-04-29 11:41:30.236 Upgrading to schema version 1113
...



> Does it make sense to
> remove the new check and fix the one in PromptForSchemaUpgrade()?

Some.

Even better would be to fix dbutil::BackupDB()
to not attempt a backup if there are no tables?

--
Nigel Pearson, nigel at ind.tansu.com.au|     "They did the
Telstra Net. Eng., Sydney, Australia | white man power dance,
Office: 9202 3900    Fax:  9261 3912 |     and ... Shazam"
Mobile: 0408 664435  Home: 9792 6998 | Lois Lane - Smallville



More information about the mythtv-dev mailing list