Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#4512 closed enhancement (fixed)

Check MySQL DBMS version

Reported by: sphery <mtdean@…> Owned by: cpinkham
Priority: major Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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.

Attachments (1)

mythtv-mysql_version_check.patch (1.8 KB) - added by sphery <mtdean@…> 16 years ago.

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by sphery <mtdean@…>

comment:1 Changed 16 years ago by cpinkham

Milestone: unknown0.21
Owner: changed from Isaac Richards to cpinkham
Priority: minormajor
Status: newassigned
Version: unknownhead

comment:2 Changed 16 years ago by cpinkham

Resolution: fixed
Status: assignedclosed

Forgot to mention this in the ticket. This should have been closed by [15579].

comment:3 Changed 16 years ago by cpinkham

s/ticket/commit log/

Note: See TracTickets for help on using tickets.