LMS-Community / slimserver

Server for Squeezebox and compatible players. This server is also called Lyrion Music Server.
https://lyrion.org
Other
1.19k stars 295 forks source link

Unknown column 'albumtrack' in 'order clause' #289

Closed oneplusme closed 4 years ago

oneplusme commented 4 years ago

Using current public/7.9 from git (071d4c082fac4b77b9338a1d56211ce5a798b05b) against a MySQL DB, attempting to play a track from the "new music" section on my Squeezebox Radio hangs indefinitely.

The server logs give:

[19-11-12 18:26:06.3293] Slim::Schema::Storage::throw_exception (122) Error: Car
p::Clan::__ANON__(): DBI Exception: DBD::mysql::st execute failed: Unknown colum
n 'albumtrack' in 'order clause' [for Statement "SELECT me.id, me.urlmd5, me.url
, me.content_type, me.title, me.titlesort, me.titlesearch, me.album, me.primary_
artist, me.tracknum, me.timestamp, me.added_time, me.updated_time, me.filesize, 
me.disc, me.remote, me.audio, me.audio_size, me.audio_offset, me.year, me.secs, 
me.cover, me.cover_cached, me.vbr_scale, me.bitrate, me.samplerate, me.samplesiz
e, me.channels, me.block_alignment, me.endian, me.bpm, me.tagversion, me.drm, me
.musicmagic_mixable, me.dlna_profile, me.musicbrainz_id, me.lossless, me.lyrics,
 me.replay_gain, me.replay_peak, me.extid, me.virtual, me.coverid FROM tracks me
 WHERE ( ( audio = ? AND me.album = ? ) ) GROUP BY me.id ORDER BY albumtrack" wi
th ParamValues: 0=1, 1='2042'] at /opt/logitechmediaserver/Slim/Schema/Storage.p
m line 126
[19-11-12 18:26:06.3295] Slim::Schema::Storage::throw_exception (122) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/opt/logitechmediaserver/Slim/Schema
/Storage.pm line 122)
   frame 1: Slim::Schema::Storage::throw_exception (/opt/logitechmediaserver/CPA
N/DBIx/Class/Storage/DBI.pm line 598)
   frame 2: DBIx::Class::Storage::DBI::dbh_do (/opt/logitechmediaserver/CPAN/DBI
x/Class/Storage/DBI/Cursor.pm line 140)
   frame 3: DBIx::Class::Storage::DBI::Cursor::all (/opt/logitechmediaserver/lib
/DBIx/Class/ResultSet.pm line 1435)
   frame 4: DBIx::Class::ResultSet::all (/opt/logitechmediaserver/Slim/Control/C
ommands.pm line 3499)
   frame 5: Slim::Control::Commands::_playlistXtracksCommand_parseSearchTerms (/
opt/logitechmediaserver/Slim/Control/Commands.pm line 2057)
   frame 6: Slim::Control::Commands::playlistcontrolCommand (/opt/logitechmedias
erver/Slim/Control/Request.pm line 1883)
   frame 7: (eval) (/opt/logitechmediaserver/Slim/Control/Request.pm line 1883)
   frame 8: Slim::Control::Request::execute (/opt/logitechmediaserver/Slim/Web/Cometd.pm line 871)
   frame 9: Slim::Web::Cometd::handleRequest (/opt/logitechmediaserver/Slim/Web/Cometd.pm line 534)
   frame 10: Slim::Web::Cometd::handler (/opt/logitechmediaserver/Slim/Web/Cometd.pm line 113)
   frame 11: Slim::Web::Cometd::webHandler (/opt/logitechmediaserver/Slim/Web/HTTP.pm line 468)
   frame 12: Slim::Web::HTTP::processHTTP (/opt/logitechmediaserver/Slim/Networking/IO/Select.pm line 123)
   frame 13: (eval) (/opt/logitechmediaserver/Slim/Networking/IO/Select.pm line 119)
   frame 14: Slim::Networking::IO::Select::__ANON__ (/opt/logitechmediaserver/Slim/Networking/IO/Select.pm line 168)
   frame 15: (eval) (/opt/logitechmediaserver/Slim/Networking/IO/Select.pm line 168)
   frame 16: Slim::Networking::IO::Select::loop (/opt/logitechmediaserver/slimserver.pl line 727)
   frame 17: main::idle (/opt/logitechmediaserver/slimserver.pl line 677)
   frame 18: main::main (/opt/logitechmediaserver/slimserver.pl line 1210)

Reverting to commit 52afce66d2f27c9cd3574287c13245799fe2f102 resolves the issue. Looks like some recent changes to the sort code are not handling "albumtrack" sort order correctly.

michaelherger commented 4 years ago

Are you sure you're actually running that revision 071d4c0? Because that very commit is supposed to fix this very issue... just asking.

mherger commented 4 years ago

I tried to reproduce this issue but can't. Can you please provide step-by-step instructions how to make this happen? Also: could you please try to reproduce using SQLite? (after you've made sure you really run the lates revision ;-))

oneplusme commented 4 years ago

Resetting to 071d4c082fac4b77b9338a1d56211ce5a798b05b and restarting the service seems to fix it. Huh. Looking at the logs, it seems I was somehow still running 6d84797d265e95007d8f8fdfd8be5036b9cccad9 - I can only assume I forgot to restart after pulling. Apologies for the noise.