Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-7846

There are mediums with non-contiguous track positions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Release editor
    • None

      As the query below demonstrates, there are mediums in the database that have tracks with non-contiguous positions:

      SELECT B.id, B.medium, B.position, B.last_updated
      FROM track A RIGHT JOIN track B
           ON A.medium = B.medium AND A.position + 1 = B.position
      WHERE A.position IS NULL AND B.position != 1;
      
          id    | medium  | position |         last_updated          
      ----------+---------+----------+-------------------------------
        1967031 |    8608 |       17 | 2011-05-16 16:08:20.288158+00
       10772674 |  832328 |       21 | 2011-05-16 16:08:20.288158+00
        4116654 |  867752 |       27 | 2011-05-16 16:08:20.288158+00
        2140117 |  884330 |        5 | 2011-05-16 16:08:20.288158+00
       16991660 |  917176 |        5 | 2014-08-16 13:28:33.974804+00
        2584922 |  925385 |        5 | 2011-05-16 16:08:20.288158+00
        3619375 |  928039 |       12 | 2014-08-27 13:00:38.676122+00
        3500891 |  940074 |       13 | 2011-05-16 16:08:20.288158+00
        2675814 |  952281 |        8 | 2011-05-16 16:08:20.288158+00
        1842242 |  992507 |       12 | 2011-10-08 16:18:06.828082+00
       15931786 | 1426501 |        2 | 2014-01-18 03:23:13.056228+00
       15931785 | 1426501 |       18 | 2014-01-18 03:23:13.056228+00
       16372652 | 1467957 |       10 | 2014-04-26 03:00:32.795528+00
       16895195 | 1518218 |       93 | 2014-07-26 03:02:25.814544+00
      (14 rows)
      

      The last result (medium 1518218) belongs to this release; it's unclear how it ended up in this state, because the last edit changing the tracklist does have a track 92, and there is nothing obviously wrong in the edit data (in particular, it has a track id of null, so no id-sharing with another track).

            Unassigned Unassigned
            chirlu Ulrich Klauer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Version Package