[mythtv-commits] Ticket #2534: Modify MythVideo DB update for MySQL 3.x compatibility
MythTV
mythtv at cvs.mythtv.org
Thu Oct 5 03:36:01 UTC 2006
#2534: Modify MythVideo DB update for MySQL 3.x compatibility
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean at thirdcontact.com> | Owner: awithers
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythvideo | Version: 0.20
Severity: medium |
----------------------------------------------+-----------------------------
Modifies the !MythVideo DB update I posted in #2040 and that was committed
in [10852] to be compatible with MySQL 3.x. The use of multi-table
UPDATEs or DELETEs (i.e. through LEFT JOIN) is only supported in MySQL
4.0+.
The initial value of categoryIDs handles the case of an empty
videocategory table and ensures we don't modify categories that are
already at 0. The patch was tested against a database with an empty
videocategories table, with some invalid categories in videometadata, and
with no invalid categories in videometadata.
If the initial query fails, a do-nothing statement is used for the update,
rather than possibly destroying valid data while cleaning up invalid data.
The invalid data could be manually fixed by the user through the
!MythVideo UI later, so it's not a critical update. Therefore, I chose to
ignore the changes if we fail to get a valid list of categories, and let
the schema update (try to) succeed. If performActualUpdate() also fails,
we'll have another chance to fix the bad categories at next startup (after
the user has fixed the database).
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2534>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list