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

Edit searches with relationship type conditions cause an internal server error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2016-06-20
    • None
    • Edit search
    • None

      Looks like an extra ')' in the query:

      Exception caught:
      
         Error: 42601 DBD::Pg::st execute failed: ERROR:  syntax error at or near "ORDER"
      LINE 10:          ORDER BY edit.id desc
                        ^ [for Statement "
              WITH x AS (SELECT edit.*, edit_data.data FROM edit JOIN edit_data ON edit.id = edit_data.edit WHERE ((EXISTS (SELECT 1 FROM edit_release WHERE edit = edit.id AND release = ?)) and (edit.editor = ?) and (type IN (90, 91, 92, 99)
               AND ? && array_remove(ARRAY[
                                         (data#>>'{link_type,id}')::int,
                                         (data#>>'{link,link_type,id}')::int,
                                         (data#>>'{old,link_type,id}')::int,
                                         (data#>>'{new,link_type,id}')::int,
                                         (data#>>'{relationship,link_type,id}')::int
                                     ], NULL) )))
               ORDER BY edit.id desc
               LIMIT 500 OFFSET ?)
              SELECT x.*, c.count AS total_row_count
              FROM x, (SELECT count(*) from x) c
           LIMIT ?" with ParamValues: 1='1784952', 2='1509086', 3='{"168"}', 4='0', 5='25']
      

            bitmap Michael Wiencek
            bitmap Michael Wiencek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2016-06-20