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

Ambiguous field 'id' in search query involving edit ID BETWEEN and "Artist in subscribed editors"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2014-04-14
    • None
    • Edit search
    • None

      https://musicbrainz.org/search/edits?auto_edit_filter=&order=desc&negation=0&combinator=and&conditions.0.field=id&conditions.0.operator=BETWEEN&conditions.0.args.0=27120010&conditions.0.args.1=27120000&conditions.1.field=artist&conditions.1.operator=subscribed&conditions.1.name=&conditions.1.args.0=&conditions.1.user_id=496863&field=Please+choose+a+condition

      produces this:

      Error:

      Caught exception in MusicBrainz::Server::Controller::Edit->search "DBD::Pg::st execute failed: ERROR: column reference "id" is ambiguous
      LINE 2: ...ibe_artist2.artist = edit_artist1.artist WHERE ((id BETWEEN...
      ^ at lib/Sql.pm line 443, line 3.
      at lib/Sql.pm line 456
      Sql::_ANON_('DBD::Pg::st execute failed: ERROR: column reference "id" is ...') called at /usr/share/perl5/Try/Tiny.pm line 100
      Try::Tiny::try('CODE(0x11d113a8)', 'Try::Tiny::Catch=REF(0x11cfeda8)', 'Try::Tiny::Finally=REF(0x1223d0d8)') called at lib/Sql.pm line 460
      Sql::_select_list('Sql=HASH(0x122128b8)', '
      WITH x AS (SELECT DISTINCT edit.* FROM edit JOIN edi...', 'ARRAY(0x1223d228)', 'hashref') called at lib/Sql.pm line 488
      Sql::select_list_of_hashes('Sql=HASH(0x122128b8)', '
      WITH x AS (SELECT DISTINCT edit.* FROM edit JOIN edi...', 27120010, 27120000, 496863, 0) called at lib/MusicBrainz/Server/Data/Utils.pm line 244
      MusicBrainz::Server::Data::Utils::query_to_list_limited('Sql=HASH(0x122128b8)', 0, 25, 'CODE(0x11ceb898)', 'SELECT DISTINCT edit.* FROM edit JOIN edit_artist edit_artist...', 27120010, 27120000, 496863, 0, ...) called at lib/MusicBrainz/Server/Data/Edit.pm line 78
      MusicBrainz::Server::Data::Edit::run_query('MusicBrainz::Server::Data::Edit=HASH(0xc6079b8)', 'MusicBrainz::Server::EditSearch::Query=HASH(0x11cfeca0)', 25, 0) called at lib/MusicBrainz/Server/Controller/Edit.pm line 200
      MusicBrainz::Server::Controller::Edit::_ANON_(25, 0) called at lib/MusicBrainz/Server/Controller.pm line 255
      MusicBrainz::Server::Controller::_load_paged('MusicBrainz::Server::Controller::Edit=HASH(0xd826618)', 'MusicBrainz::Server=HASH(0xe2676c8)', 'CODE(0xe8505d0)') called at lib/MusicBrainz/Server/Controller/Edit.pm line 201
      MusicBrainz::Server::Controller::Edit::search('MusicBrainz::Server::Controller::Edit=HASH(0xd826618)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute('Catalyst::Action=HASH(0xdb886b8)', 'MusicBrainz::Server::Controller::Edit=HASH(0xd826618)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst.pm line 1691
      eval

      {...} called at /usr/share/perl5/Catalyst.pm line 1691
      Catalyst::execute('MusicBrainz::Server=HASH(0xe2676c8)', 'MusicBrainz::Server::Controller::Edit', 'Catalyst::Action=HASH(0xdb886b8)') called at /usr/share/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0xe2676c8)', 'MusicBrainz::Server::Controller::Edit', 'Catalyst::Action=HASH(0xdb886b8)') called at /usr/share/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch('Catalyst::Action=HASH(0xdb886b8)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst/Controller.pm line 125
      Catalyst::Controller::_ACTION('MusicBrainz::Server::Controller::Edit=HASH(0xd826618)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute('Catalyst::Action=HASH(0xdb808e8)', 'MusicBrainz::Server::Controller::Edit=HASH(0xd826618)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst.pm line 1691
      eval {...}

      called at /usr/share/perl5/Catalyst.pm line 1691
      Catalyst::execute('MusicBrainz::Server=HASH(0xe2676c8)', 'MusicBrainz::Server::Controller::Edit', 'Catalyst::Action=HASH(0xdb808e8)') called at /usr/share/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0xe2676c8)', 'MusicBrainz::Server::Controller::Edit', 'Catalyst::Action=HASH(0xdb808e8)') called at /usr/share/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch('Catalyst::Action=HASH(0xdb808e8)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward('Catalyst::Dispatcher=HASH(0x47ead00)', 'forward', 'MusicBrainz::Server=HASH(0xe2676c8)', '_ACTION') called at /usr/share/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x47ead00)', 'MusicBrainz::Server=HASH(0xe2676c8)', '_ACTION') called at /usr/share/perl5/Catalyst.pm line 358
      Catalyst::forward('MusicBrainz::Server=HASH(0xe2676c8)', '_ACTION') called at /usr/share/perl5/Catalyst/Controller.pm line 99
      Catalyst::Controller::_DISPATCH('MusicBrainz::Server::Controller::Edit=HASH(0xd826618)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst/Action.pm line 65
      Catalyst::Action::execute('Catalyst::Action=HASH(0xdb80498)', 'MusicBrainz::Server::Controller::Edit=HASH(0xd826618)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst.pm line 1691
      eval

      {...} called at /usr/share/perl5/Catalyst.pm line 1691
      Catalyst::execute('MusicBrainz::Server=HASH(0xe2676c8)', 'MusicBrainz::Server::Controller::Edit', 'Catalyst::Action=HASH(0xdb80498)') called at /usr/share/perl5/Catalyst/Plugin/StackTrace.pm line 94
      Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0xe2676c8)', 'MusicBrainz::Server::Controller::Edit', 'Catalyst::Action=HASH(0xdb80498)') called at /usr/share/perl5/Catalyst/Action.pm line 60
      Catalyst::Action::dispatch('Catalyst::Action=HASH(0xdb80498)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst/Dispatcher.pm line 257
      Catalyst::Dispatcher::_do_forward('Catalyst::Dispatcher=HASH(0x47ead00)', 'forward', 'MusicBrainz::Server=HASH(0xe2676c8)', '/edit/_DISPATCH') called at /usr/share/perl5/Catalyst/Dispatcher.pm line 237
      Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x47ead00)', 'MusicBrainz::Server=HASH(0xe2676c8)', '/edit/_DISPATCH') called at /usr/share/perl5/Catalyst.pm line 358
      Catalyst::forward('MusicBrainz::Server=HASH(0xe2676c8)', '/edit/_DISPATCH') called at /usr/share/perl5/Catalyst/Dispatcher.pm line 105
      Catalyst::Dispatcher::dispatch('Catalyst::Dispatcher=HASH(0x47ead00)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst.pm line 1637
      Catalyst::dispatch('MusicBrainz::Server=HASH(0xe2676c8)') called at lib/MusicBrainz/Server.pm line 335
      MusicBrainz::Server::_ANON_() called at lib/MusicBrainz/Server.pm line 309
      MusicBrainz::Server::with_translations('MusicBrainz::Server=HASH(0xe2676c8)', 'CODE(0xe4bd388)') called at lib/MusicBrainz/Server.pm line 336
      Class::MOP::Class:::around('CODE(0x3c4d8d0)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0xe2676c8)') called at lib/MusicBrainz/Server.pm line 350
      Class::MOP::Class:::around('CODE(0x47eabb0)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0xe2676c8)') called at lib/MusicBrainz/Server.pm line 395
      Class::MOP::Class:::around('CODE(0xddfe450)', 'MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 162
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 35
      Class::MOP::Method::Wrapped::_ANON_('MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/lib/perl5/Class/MOP/Method/Wrapped.pm line 91
      MusicBrainz::Server::dispatch('MusicBrainz::Server=HASH(0xe2676c8)') called at /usr/share/perl5/Catalyst.pm line 1987
      Catalyst::_ANON_() called at /usr/share/perl5/Try/Tiny.pm line 76
      eval {...}

      called at /usr/share/perl5/Try/Tiny.pm line 67
      Try::Tiny::try('CODE(0xe71b908)', 'Try::Tiny::Catch=REF(0xe725e40)') called at /usr/share/perl5/Catalyst.pm line 1993
      Catalyst::handle_request('MusicBrainz::Server', 'env', 'HASH(0xe791758)', 'response_cb', 'CODE(0xe6fda70)') called at /usr/share/perl5/Catalyst/Plugin/AutoRestart.pm line 117
      Catalyst::Plugin::AutoRestart::handle_request('MusicBrainz::Server', 'env', 'HASH(0xe791758)', 'response_cb', 'CODE(0xe6fda70)') called at /usr/share/perl5/Catalyst/Engine.pm line 682
      Catalyst::Engine::_ANON_('CODE(0xe6fda70)') called at /usr/share/perl5/Starman/Server.pm line 225
      Starman::Server::process_request('Starman::Server=HASH(0x1db3910)') called at /usr/share/perl5/Net/Server.pm line 142
      Net::Server::run_client_connection('Starman::Server=HASH(0x1db3910)') called at /usr/share/perl5/Net/Server/PreFork.pm line 273
      eval

      {...}

      called at /usr/share/perl5/Net/Server/PreFork.pm line 273
      Net::Server::PreFork::run_child('Starman::Server=HASH(0x1db3910)') called at /usr/share/perl5/Net/Server/PreFork.pm line 229
      Net::Server::PreFork::run_n_children('Starman::Server=HASH(0x1db3910)', 1) called at /usr/share/perl5/Net/Server/PreFork.pm line 456
      Net::Server::PreFork::coordinate_children('Starman::Server=HASH(0x1db3910)') called at /usr/share/perl5/Net/Server/PreFork.pm line 357
      Net::Server::PreFork::run_parent('Starman::Server=HASH(0x1db3910)') called at /usr/share/perl5/Starman/Server.pm line 104
      Starman::Server::run_parent('Starman::Server=HASH(0x1db3910)') called at /usr/share/perl5/Net/Server/PreFork.pm line 147
      Net::Server::PreFork::loop('Starman::Server=HASH(0x1db3910)') called at /usr/share/perl5/Net/Server.pm line 117
      Net::Server::run('Starman::Server=HASH(0x1db3910)', 'port', 'ARRAY(0xde04bd8)', 'host', 'ARRAY(0xde04cb0)', 'proto', 'ARRAY(0xdfdd500)', 'serialize', 'flock', ...) called at /usr/share/perl5/Starman/Server.pm line 61
      Starman::Server::run('Starman::Server=HASH(0x1db3910)', 'CODE(0xde35ba8)', 'HASH(0x1de3450)') called at /usr/share/perl5/Plack/Handler/Starman.pm line 18
      Plack::Handler::Starman::run('Plack::Handler::Starman=HASH(0x1db3970)', 'CODE(0xde35ba8)') called at /usr/share/perl5/Plack/Loader.pm line 88
      Plack::Loader::run('Plack::Loader=HASH(0x1dae4f0)', 'Plack::Handler::Starman=HASH(0x1db3970)') called at /usr/share/perl5/Plack/Runner.pm line 263
      Plack::Runner::run('Plack::Runner=HASH(0x1ba4898)') called at /usr/local/bin/starman line 31"

      Stack trace:

      line 244 MusicBrainz::Server::Data::Utils
      line 78 MusicBrainz::Server::Data::Edit
      line 200 MusicBrainz::Server::Controller::Edit
      line 255 MusicBrainz::Server::Controller
      line 201 MusicBrainz::Server::Controller::Edit
      line 335 MusicBrainz::Server
      line 309 MusicBrainz::Server
      line 336 MusicBrainz::Server
      line 350 MusicBrainz::Server
      line 395 MusicBrainz::Server

      Request data:

      $VAR1 = {
      'query_parameters' =>

      { 'conditions.1.name' => '', 'conditions.1.field' => 'artist', 'conditions.0.operator' => 'BETWEEN', 'conditions.0.args.1' => '27120000', 'conditions.1.args.0' => '', 'conditions.0.field' => 'id', 'conditions.0.args.0' => '27120010', 'order' => 'desc', 'conditions.1.user_id' => '496863', 'combinator' => 'and', 'field' => 'Please choose a condition', 'conditions.1.operator' => 'subscribed', 'auto_edit_filter' => '', 'negation' => '0' }

      ,
      'body_parameters' => {}
      };

      Time: 2014-04-04 07:26:11 UTC

      Host: asterix

      URL: https://musicbrainz.org/search/edits?auto_edit_filter=&order=desc&negation=0&combinator=and&conditions.0.field=id&conditions.0.operator=BETWEEN&conditions.0.args.0=27120010&conditions.0.args.1=27120000&conditions.1.field=artist&conditions.1.operator=subscribed&conditions.1.name=&conditions.1.args.0=&conditions.1.user_id=496863&field=Please+choose+a+condition

            ianmcorvidae Ian McEwen
            jessew Jesse W
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2014-04-14