Skip to content

[videodb] we can't use REPLACE INTO when updating values during UpdateTables #5002

Merged
merged 1 commit into from Jul 11, 2014

3 participants

@jmarshallnz
Team Kodi member

Reason is analytics aren't in place. Fixes problems where a show path appearing in more than one multipath being duplicated on update (thus failing).

Fixes #15334

@Montellese mind sanity checking (it's reasonably straight-forward!)

Jonathan Marshall [videodb] we can't use REPLACE INTO when updating values during Updat…
…eTables as analytics aren't in place. fixes problems where a show path appearing in more than one multipath being duplicated on update (thus failing). fixes #15334
ab4a25b
@Montellese
Team Kodi member

Are you sure this is equivalent? REPLACE INTO either

  • adds the new value if the ID doesn't already exist
  • delete the old value with the same ID and then adds the new value if the ID already exists

Your new code just adds the new value if the ID doesn't already exist.

@jmarshallnz
Team Kodi member

In this case they're equivalent, yes, as the uniqueness is on the two fields we're querying, and the two fields we're filling. Thus, delete + add is the same as "do nothing".

@Montellese
Team Kodi member

Okay.

@jmarshallnz
Team Kodi member

Thanks :)

@jmarshallnz jmarshallnz merged commit 5f031ff into xbmc:master Jul 11, 2014
@jmarshallnz jmarshallnz deleted the jmarshallnz:tvshow_multipath_update_fix branch Jul 11, 2014
@MartijnKaijser MartijnKaijser added this to the Helix 14.0-alpha1 milestone Jul 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.