id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 2534,Modify MythVideo DB update for MySQL 3.x compatibility,sphery ,Anduin Withers,"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).",patch,closed,minor,unknown,mythvideo,0.20,medium,fixed,,,0