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

foreign key constraint violation: Track artist credit can't be changed in release editor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      https://musicbrainz.org/release/73dff9a0-e2cf-4ca1-aee5-9ae2c0e9fc1b Track 5 changing from "Too short" to "Too Short"
      Initially reported on IRC.

      Failed query: 'UPDATE track SET length = ?, number = ?, artist_credit = ?, is_data_track = ?, position = ?, name = ?, recording = ?, id = ?, medium = ? WHERE id = ?' (298546 5 3356350 0 5 Bitch 788593 6564152 367587 6564152) 23503 DBD::Pg::st execute failed: ERROR: update or delete on table "artist_credit" violates foreign key constraint "artist_credit_gid_redirect_fk_new_id" on table "artist_credit_gid_redirect" DETAIL: Key (id)=(3332636) is still referenced from table "artist_credit_gid_redirect". CONTEXT: SQL statement "DELETE FROM artist_credit WHERE id = 3332636" PL/pgSQL function dec_ref_count(character varying,integer,integer) line 9 at EXECUTE SQL statement "SELECT dec_ref_count('artist_credit', OLD.artist_credit, 1)" PL/pgSQL function a_upd_track() line 4 at PERFORM [for Statement "UPDATE track SET length = ?, number = ?, artist_credit = ?, is_data_track = ?, position = ?, name = ?, recording = ?, id = ?, medium = ? WHERE id = ?" with ParamValues: 1='298546', 2='5', 3='3356350', 4='0', 5='5', 6='Bitch', 7='788593', 8='6564152', 9='367587', 10='6564152'] at lib/Sql.pm line 116. Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x55624db18718)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 123 Try::Tiny::try(CODE(0x55624dfcfd88), Try::Tiny::Catch=REF(0x55624ce267e8)) called at lib/Sql.pm line 117 Sql::do(Sql=HASH(0x556248654e30), "UPDATE track SET length = ?, number = ?, artist_credit = ?, i"..., 298546, 5, 3356350, 0, 5, "Bitch", ...) called at lib/Sql.pm line 203 Sql::update_row(Sql=HASH(0x556248654e30), "track", HASH(0x55624dfc4068), HASH(0x55624dfd0328)) called at lib/MusicBrainz/Server/Data/Track.pm line 237 MusicBrainz::Server::Data::Track::update(MusicBrainz::Server::Data::Track=HASH(0x556246963c58), 6564152, HASH(0x55624dfc1b48)) called at lib/MusicBrainz/Server/Edit/Medium/Edit.pm line 547 MusicBrainz::Server::Edit::Medium::Edit::accept(MusicBrainz::Server::Edit::Medium::Edit=HASH(0x55624df95e40)) called at lib/MusicBrainz/Server/Data/Edit.pm line 774 MusicBrainz::Server::Data::Edit::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 100 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93 Try::Tiny::try(CODE(0x55624ddfca78), Try::Tiny::Catch=REF(0x55624df95f60)) called at lib/MusicBrainz/Server/Data/Edit.pm line 809 MusicBrainz::Server::Data::Edit::_do_accept(MusicBrainz::Server::Data::Edit=HASH(0x556245824e50), MusicBrainz::Server::Edit::Medium::Edit=HASH(0x55624df95e40)) called at lib/MusicBrainz/Server/Data/Edit.pm line 848 MusicBrainz::Server::Data::Edit::__ANON__(MusicBrainz::Server::Edit::Medium::Edit=HASH(0x55624df95e40)) called at lib/MusicBrainz/Server/Data/Edit.pm line 871 MusicBrainz::Server::Data::Edit::_close(MusicBrainz::Server::Data::Edit=HASH(0x556245824e50), MusicBrainz::Server::Edit::Medium::Edit=HASH(0x55624df95e40), CODE(0x55624df50ef0)) called at lib/MusicBrainz/Server/Data/Edit.pm line 848 MusicBrainz::Server::Data::Edit::accept(MusicBrainz::Server::Data::Edit=HASH(0x556245824e50), MusicBrainz::Server::Edit::Medium::Edit=HASH(0x55624df95e40)) called at lib/MusicBrainz/Server/Data/Edit.pm line 618 MusicBrainz::Server::Data::Edit::create(MusicBrainz::Server::Data::Edit=HASH(0x556245824e50), "delete_tracklist", 0, "tracklist", ARRAY(0x556248e1d008), "to_edit", MusicBrainz::Server::Entity::Medium=HASH(0x556249497078), "edit_type", ...) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 599 MusicBrainz::Server::Controller::WS::js::Edit::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93 Try::Tiny::try(CODE(0x556248dd1d08), Try::Tiny::Catch=REF(0x5562496fa078)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 617 MusicBrainz::Server::Controller::WS::js::Edit::create_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8), HASH(0x556248e6e048)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 679 MusicBrainz::Server::Controller::WS::js::Edit::__ANON__() called at lib/Sql.pm line 322 Sql::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93 Try::Tiny::try(CODE(0x556248dccb98), Try::Tiny::Catch=REF(0x556249748d08)) called at lib/Sql.pm line 335 Sql::_auto_transaction(CODE(0x55624972c3f8), Sql=HASH(0x556248654e30)) called at lib/Sql.pm line 340 Sql::_run_in_transaction_one(CODE(0x55624972c3f8), Sql=HASH(0x556248654e30)) called at lib/Sql.pm line 355 Sql::run_in_transaction(CODE(0x55624972c3f8), Sql=HASH(0x556248654e30)) called at lib/MusicBrainz/Server/Model/MB.pm line 19 MusicBrainz::Server::Model::MB::with_transaction(MusicBrainz::Server::Model::MB=HASH(0x55624517bf58), CODE(0x55624972c3f8)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 690 MusicBrainz::Server::Controller::WS::js::Edit::submit_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8), HASH(0x556248e6e048)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 649 MusicBrainz::Server::Controller::WS::js::Edit::create(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x5562478ad4a0), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x55623fd6c6b8), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x5562478ad4a0)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x55623fd6c6b8), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x5562478ad4a0)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x5562478ad4a0), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/ActionChain.pm line 46 Catalyst::ActionChain::dispatch(Catalyst::ActionChain=HASH(0x556248a33fe0), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 170 Catalyst::Controller::_ACTION(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x5562478a8840), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x55623fd6c6b8), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x5562478a8840)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x55623fd6c6b8), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x5562478a8840)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x5562478a8840), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x55623a62a8f8), "forward", MusicBrainz::Server=HASH(0x55623fd6c6b8), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x55623a62a8f8), MusicBrainz::Server=HASH(0x55623fd6c6b8), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 482 Catalyst::forward(MusicBrainz::Server=HASH(0x55623fd6c6b8), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 134 Catalyst::Controller::_DISPATCH(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x5562478a82a0), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x5562473a70f8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x55623fd6c6b8), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x5562478a82a0)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x55623fd6c6b8), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x5562478a82a0)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x5562478a82a0), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x55623a62a8f8), "forward", MusicBrainz::Server=HASH(0x55623fd6c6b8), "/ws/js/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x55623a62a8f8), MusicBrainz::Server=HASH(0x55623fd6c6b8), "/ws/js/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 482 Catalyst::forward(MusicBrainz::Server=HASH(0x55623fd6c6b8), "/ws/js/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 107 Catalyst::Dispatcher::dispatch(Catalyst::Dispatcher=HASH(0x55623a62a8f8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2006 Catalyst::dispatch(MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at lib/MusicBrainz/Server.pm line 388 MusicBrainz::Server::__ANON__() called at lib/MusicBrainz/Server.pm line 353 MusicBrainz::Server::with_translations(MusicBrainz::Server=HASH(0x55623fd6c6b8), CODE(0x556247b09e98)) called at lib/MusicBrainz/Server.pm line 389 Class::MOP::Class:::around(CODE(0x556235c48cf8), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 166 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at lib/MusicBrainz/Server.pm line 403 Class::MOP::Class:::around(CODE(0x556247406e80), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 166 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at lib/MusicBrainz/Server.pm line 488 Class::MOP::Class:::around(CODE(0x55624741c530), MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 166 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 35 MusicBrainz::Server::_wrapped_dispatch(MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 97 MusicBrainz::Server::dispatch(MusicBrainz::Server=HASH(0x55623fd6c6b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2412 Catalyst::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93 Try::Tiny::try(CODE(0x556248e88500), Try::Tiny::Catch=REF(0x5562488d4430)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2421 Catalyst::handle_request("MusicBrainz::Server", "env", HASH(0x5562497153e8), "response_cb", CODE(0x5562489f9e88)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Engine.pm line 807 Catalyst::Engine::__ANON__(CODE(0x5562489f9e88)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 32 Plack::Middleware::HTTPExceptions::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93 Try::Tiny::try(CODE(0x556248b2cef0), Try::Tiny::Catch=REF(0x556248bd90c0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 41 Plack::Middleware::HTTPExceptions::__ANON__(CODE(0x556248e1d320)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x5562497510c8)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x556248dcc060)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x556248ea9d18)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x556248e87b70)) called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 377 Starlet::Server::handle_connection(Plack::Handler::Starlet=HASH(0x556243085788), HASH(0x5562497153e8), IO::Socket::INET=GLOB(0x556247b0a0c0), CODE(0x556247942df0), "", "", "") called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 190 Starlet::Server::accept_loop(Plack::Handler::Starlet=HASH(0x556243085788), CODE(0x556247942df0), 44) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Handler/Starlet.pm line 80 Plack::Handler::Starlet::run(Plack::Handler::Starlet=HASH(0x556243085788), CODE(0x556247942df0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Loader.pm line 84 Plack::Loader::run(Plack::Loader=HASH(0x5562338a2658), Plack::Handler::Starlet=HASH(0x556243085788)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Runner.pm line 279 Plack::Runner::run(Plack::Runner=HASH(0x5562335ffdb0)) called at /home/musicbrainz/carton-local/bin/plackup line 7
      
      
      

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

              Created:
              Updated:
              Resolved:

                Version Package