Opened 17 years ago
Closed 17 years ago
Last modified 17 years ago
#4512 closed enhancement (fixed)
Check MySQL DBMS version
Reported by: | 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)
Change History (4)
Changed 17 years ago by
Attachment: | mythtv-mysql_version_check.patch added |
---|
comment:1 Changed 17 years ago by
Milestone: | unknown → 0.21 |
---|---|
Owner: | changed from Isaac Richards to cpinkham |
Priority: | minor → major |
Status: | new → assigned |
Version: | unknown → head |
comment:2 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Forgot to mention this in the ticket. This should have been closed by [15579].