[mythtv-commits] Ticket #4512: Check MySQL DBMS version

MythTV mythtv at cvs.mythtv.org
Mon Jan 21 23:58:04 UTC 2008

#4512: Check MySQL DBMS version
 Reporter:  sphery <mtdean at thirdcontact.com>  |       Owner:  ijr    
     Type:  enhancement                       |      Status:  new    
 Priority:  minor                             |   Milestone:  unknown
Component:  mythtv                            |     Version:  unknown
 Severity:  medium                            |     Mlocked:  0      
 The attached patch checks MySQL DBMS major version and exits if it's below
 5.  The check is performed as a part of UpgradeTVDatabaseSchema() and as
 attached will exit even if the user's database schema is the proper
 version.  In the event that an upgrade is required, Myth will exit before
 attempting a DB schema upgrade so that the user has the option of either
 upgrading MySQL or downgrading MythTV.

 I created the patch only because of the 2 questions on the lists, so far,
 about database upgrade failures due to MySQL version.  Without the patch,
 the DB upgrade to version 1203 will fail with the error:

 Database error was:
 Column length too big for column 'filepath' (max = 255); use BLOB or
 TEXT instead

 The patch simply presents a better (more understandable and more precise)
 error message and prevents an upgrade to allow the user to choose whether
 to upgrade MySQL or downgrade MythTV.

 If for some reason it would be desirable to let people run with MySQL 4.x
 (though even for 4.x, hacking would be required as 1203 is not 4.x
 compatible), moving the

 if (dbver == currentDatabaseVersion)
         return true;

 check before the dbmsversion check would allow a user with an already-
 upgraded DB to try to run MythTV on an older MySQL version.  However,
 since that would require manually updating the schema as well as hacking
 the code, it's probably just as easy for a user to disable the dbmsversion
 check (or just set MINIMUM_DBMS_VERSION to 1) in her personal tree.

Ticket URL: <http://svn.mythtv.org/trac/ticket/4512>
MythTV <http://svn.mythtv.org/trac>

More information about the mythtv-commits mailing list