Update version transaction #953

merged 5 commits into from Jul 8, 2012

2 participants

Team Kodi member

This ensures we remain inside a transaction for the complete run of UpdateVersion. Before there was a (very slim) chance that UpdateOldVersion could be called from thread A while thread B was in between UpdateOldVersion/UpdateVersionNumber.

I doubt this is an actual issue, but it makes sense to complete it all under a transaction so that the rollback occurs as one would expect for the cases where we screw up the UpdateOldVersion for mysql :p

Team Kodi member

Looks good to me. But since we are relying on the exception now we could even get rid of that return bool value (which now allways returns true). But thats only cosmetic of course.

Team Kodi member

Correct - I figured at some point we might want to have a check that returns false in the future. Doesn't hurt.

@jmarshallnz jmarshallnz was assigned Jul 8, 2012
@jmarshallnz jmarshallnz merged commit 4d1bbd6 into xbmc:master Jul 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment