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

Internal server error when using a negative limit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2013-08-19
    • None
    • Web service
    • None

      e.g. https://beta.musicbrainz.org/ws/2/release/?limit=-1&artist=e0140a67-e4d1-4f13-8a01-364355bee46e&offset=0&type=album&status=official

      Fehler:

      Caught exception in MusicBrainz::Server::Controller::WS::2::Release->release_browse "Failed query:
      '
      WITH x AS (
      SELECT *
      FROM (
      SELECT DISTINCT ON (release.id)
      release.id, release.gid, name.name, release.artist_credit AS artist_credit_id,
      release.release_group, release.status, release.packaging,
      release.comment, release.edits_pending, release.barcode,
      release.script, release.language, release.quality, release.last_updated,
      date_year, date_month, date_day, area.name AS country_name
      FROM release JOIN release_name name ON release.name=name.id
      JOIN artist_credit_name acn ON acn.artist_credit = release.artist_credit
      JOIN release_group ON release.release_group = release_group.id
      LEFT JOIN (
      SELECT release, country, date_year, date_month, date_day
      FROM release_country
      UNION ALL
      SELECT release, NULL, date_year, date_month, date_day
      FROM release_unknown_country
      ) release_event ON release_event.release = release.id
      LEFT JOIN area ON area.id = release_event.country
      WHERE status IN AND release_group.type = any AND acn.artist = ?
      ORDER BY release.id, date_year, date_month, date_day,
      country_name, barcode, musicbrainz_collate(name.name)
      ) release
      ORDER BY date_year, date_month, date_day,
      country_name, barcode, musicbrainz_collate(name)
      OFFSET ?)
      SELECT x.*, c.count AS total_row_count
      FROM x, (SELECT count from x) c LIMIT -1'
      (1 ARRAY(0x11f2fa58) 634509 0)
      DBD::Pg::st execute failed: ERROR: LIMIT must not be negative at lib/Sql.pm line 83.

      at lib/Sql.pm line 88.
      Sql::_ANON_('DBD::Pg::st execute failed: ERROR: LIMIT must not be negativ...') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Try/Tiny.pm line 100
      Try::Tiny::try('CODE(0xef15df0)', 'Try::Tiny::Catch=REF(0xe7cd9d8)') called at lib/Sql.pm line 90
      Sql::select('Sql=HASH(0xf373340)', '\x

      Unknown macro: {a}

      WITH x AS (\x

      SELECT *\x

      Unknown macro: {a}

      FROM (\x

      SELE...', 1, 'ARRAY(0x11f2fa58)', 634509, 0) called at lib/MusicBrainz/Server/Data/Utils.pm line 239
      MusicBrainz::Server::Data::Utils::query_to_list_limited('Sql=HASH(0xf373340)', 0, -1, 'CODE(0x12cb9478)', '\x

      Unknown macro: {a}

      SELECT *\x

      FROM (\x

      Unknown macro: {a}

      SELECT DISTINCT ON (rele...', 1, 'ARRAY(0x11f2fa58)', 634509, 0, ...) called at lib/MusicBrainz/Server/Data/Release.pm line 194
      MusicBrainz::Server::Data::Release::find_by_artist('MusicBrainz::Server::Data::Release=HASH(0xcbd72f0)', 634509, -1, 0, 'filter', 'HASH(0xfb17640)') called at lib/MusicBrainz/Server/Controller/WS/2/Release.pm line 194
      MusicBrainz::Server::Controller::WS::2::Release::release_browse('MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute('Catalyst::Action=HASH(0xd9a1e28)', 'MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      eval

      Unknown macro: {...}

      called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      Catalyst::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd9a1e28)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd9a1e28)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch('Catalyst::Action=HASH(0xd9a1e28)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward('Catalyst::Dispatcher=HASH(0x494ae70)', 'detach', 'MusicBrainz::Server=HASH(0x12ce4158)', 'release_browse') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 270
      Catalyst::Dispatcher::detach('Catalyst::Dispatcher=HASH(0x494ae70)', 'MusicBrainz::Server=HASH(0x12ce4158)', 'release_browse') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 377
      Catalyst::detach('MusicBrainz::Server=HASH(0x12ce4158)', 'release_browse') called at lib/MusicBrainz/Server/Controller/WS/2/Release.pm line 251
      MusicBrainz::Server::Controller::WS::2::Release::release_search('MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute('Catalyst::Action=HASH(0xd9a1fc0)', 'MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      eval

      called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      Catalyst::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd9a1fc0)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd9a1fc0)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch('Catalyst::Action=HASH(0xd9a1fc0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/ActionChain.pm line 38
      Catalyst::ActionChain::dispatch('Catalyst::ActionChain=HASH(0xf3734f0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Controller.pm line 158
      Catalyst::Controller::_ACTION('MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute('Catalyst::Action=HASH(0xd99e130)', 'MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      eval

      Unknown macro: {...}

      called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      Catalyst::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd99e130)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd99e130)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch('Catalyst::Action=HASH(0xd99e130)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward('Catalyst::Dispatcher=HASH(0x494ae70)', 'forward', 'MusicBrainz::Server=HASH(0x12ce4158)', '_ACTION') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x494ae70)', 'MusicBrainz::Server=HASH(0x12ce4158)', '_ACTION') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 362
      Catalyst::forward('MusicBrainz::Server=HASH(0x12ce4158)', '_ACTION') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Controller.pm line 132
      Catalyst::Controller::_DISPATCH('MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute('Catalyst::Action=HASH(0xd99d8d8)', 'MusicBrainz::Server::Controller::WS::2::Release=HASH(0xd5aefe0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      eval

      called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1672
      Catalyst::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd99d8d8)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0x12ce4158)', 'MusicBrainz::Server::Controller::WS::2::Release', 'Catalyst::Action=HASH(0xd99d8d8)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch('Catalyst::Action=HASH(0xd99d8d8)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward('Catalyst::Dispatcher=HASH(0x494ae70)', 'forward', 'MusicBrainz::Server=HASH(0x12ce4158)', '/ws/2/release/_DISPATCH') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x494ae70)', 'MusicBrainz::Server=HASH(0x12ce4158)', '/ws/2/release/_DISPATCH') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 362
      Catalyst::forward('MusicBrainz::Server=HASH(0x12ce4158)', '/ws/2/release/_DISPATCH') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 105
      Catalyst::Dispatcher::dispatch('Catalyst::Dispatcher=HASH(0x494ae70)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1618
      Catalyst::dispatch('MusicBrainz::Server=HASH(0x12ce4158)') called at lib/MusicBrainz/Server.pm line 330
      MusicBrainz::Server::_ANON_() called at lib/MusicBrainz/Server.pm line 304
      MusicBrainz::Server::with_translations('MusicBrainz::Server=HASH(0x12ce4158)', 'CODE(0xfff3800)') called at lib/MusicBrainz/Server.pm line 331
      Class::MOP::Class:::around('CODE(0x3cc3100)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0x12ce4158)') called at lib/MusicBrainz/Server.pm line 345
      Class::MOP::Class:::around('CODE(0xdb23618)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0x12ce4158)') called at lib/MusicBrainz/Server.pm line 390
      Class::MOP::Class:::around('CODE(0xdb3a2d0)', 'MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 35
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 91
      MusicBrainz::Server::dispatch('MusicBrainz::Server=HASH(0x12ce4158)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1968
      Catalyst::_ANON_() called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Try/Tiny.pm line 76
      eval

      Unknown macro: {...}

      called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Try/Tiny.pm line 67
      Try::Tiny::try('CODE(0x12c9cf10)', 'Try::Tiny::Catch=REF(0x12cdc108)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1974
      Catalyst::handle_request('MusicBrainz::Server', 'env', 'HASH(0xfaf5f10)', 'response_cb', 'CODE(0xef1b398)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/AutoRestart.pm line 117
      Catalyst::Plugin::AutoRestart::handle_request('MusicBrainz::Server', 'env', 'HASH(0xfaf5f10)', 'response_cb', 'CODE(0xef1b398)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Engine.pm line 688
      Catalyst::Engine::_ANON_('CODE(0xef1b398)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Plack/Handler/FCGI.pm line 130
      Plack::Handler::FCGI::run('Plack::Handler::FCGI=HASH(0x1b25f00)', 'CODE(0xdb436a8)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Plack/Loader.pm line 84
      Plack::Loader::run('Plack::Loader=HASH(0x1a4d378)', 'Plack::Handler::FCGI=HASH(0x1b25f00)') called at /home/beta/musicbrainz-server/admin/../local/lib/perl5/Plack/Runner.pm line 267
      Plack::Runner::run('Plack::Runner=HASH(0x18cf768)') called at /home/beta/musicbrainz-server/admin/../local/bin/plackup line 10"

      Stack-Trace:
      line 330 MusicBrainz::Server
      line 304 MusicBrainz::Server
      line 331 MusicBrainz::Server
      line 345 MusicBrainz::Server
      line 390 MusicBrainz::Server

      Anfragedaten:
      $VAR1 = {
      'query_parameters' =>

      Unknown macro: { 'artist' => 'e0140a67-e4d1-4f13-8a01-364355bee46e', 'status' => 'official', 'type' => 'album', 'limit' => '-1', 'offset' => '0' }

      ,
      'body_parameters' => {}
      };

      Host: pino

      Oberflächensprache: de

      URL: https://beta.musicbrainz.org/ws/2/release/?limit=-1&artist=e0140a67-e4d1-4f13-8a01-364355bee46e&offset=0&type=album&status=official

            acid2 Oliver Charles
            nikki nikki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2013-08-19