Bug 10210 - RandomPlay: MySQL error if only one track in selected genre?
: RandomPlay: MySQL error if only one track in selected genre?
Status: RESOLVED DUPLICATE of bug 10391
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 7.3.0
: PC Other
: P4 minor (vote)
: 7.3.3
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-03 16:50 UTC by Peter Watkins
Modified: 2009-01-10 09:18 UTC (History)
0 users

See Also:
Category: ---


Attachments
error log (102.45 KB, text/plain)
2008-12-08 13:26 UTC, James Richardson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Watkins 2008-12-03 16:50:14 UTC
My dev system has very few tracks. Some genres contain only a single track. If I ask for a random mix of tracks from a genre that only has one available track, SC7 logs errors like this:

[08-12-03 19:41:24.6651] Slim::Control::Request::notify (2073) Error: Failed notify: Carp::Clan::__ANON__(): Error executing 'SELECT me.id, me.url, me.content_type, me.title, me.titlesort, me.titlesearch, me.album, me.tracknum, me.timestamp, me.filesize, me.disc, me.remote, me.audio, me.audio_size, me.audio_offset, me.year, me.secs, me.cover, me.vbr_scale, me.bitrate, me.samplerate, me.samplesize, me.channels, me.block_alignment, me.endian, me.bpm, me.tagversion, me.drm, me.musicmagic_mixable, me.musicbrainz_id, me.lossless, me.lyrics, me.replay_gain, me.replay_peak, me.extid FROM tracks me WHERE ( id IN (  ) ) ORDER BY RAND()': DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) ORDER BY RAND()' at line 1 at /path/to/server/CPAN/DBIx/Class/Storage/DBI.pm line 771.

[08-12-03 19:41:24.7252] Slim::Schema::Storage::throw_exception (70) Error: Error executing 'SELECT me.id, me.url, me.content_type, me.title, me.titlesort, me.titlesearch, me.album, me.tracknum, me.timestamp, me.filesize, me.disc, me.remote, me.audio, me.audio_size, me.audio_offset, me.year, me.secs, me.cover, me.vbr_scale, me.bitrate, me.samplerate, me.samplesize, me.channels, me.block_alignment, me.endian, me.bpm, me.tagversion, me.drm, me.musicmagic_mixable, me.musicbrainz_id, me.lossless, me.lyrics, me.replay_gain, me.replay_peak, me.extid FROM tracks me WHERE ( id IN (  ) ) ORDER BY RAND()': DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) ORDER BY RAND()' at line 1 at /path/to/server/CPAN/DBIx/Class/Storage/DBI.pm line 771.

I'm using CLI commands like the following to request the mix:

randomplaygenreselectall 0
randomplaychoosegenre Podcast 1
randomplay tracks

Sometimes SC7 will actually play the single track, but other times it will not.

SVN info:

Path: server
URL: https://svn.slimdevices.com/repos/slim/7.3/trunk/server
Repository Root: https://svn.slimdevices.com/repos/slim
Repository UUID: 60ad55ce-86ed-0310-8cf8-f9d879be5ea1
Revision: 24188
Node Kind: directory
Schedule: normal
Last Changed Author: andy
Last Changed Rev: 24188
Last Changed Date: 2008-12-03 12:07:25 -0500 (Wed, 03 Dec 2008

This is on Ubunto 8.04 LTS, apparently running MySQL 4.1.15.
Comment 1 James Richardson 2008-12-08 09:24:44 UTC
QA to investigate
Comment 2 James Richardson 2008-12-08 13:26:23 UTC
Created attachment 4400 [details]
error log

QA verified with SC 7.3 r24187  See attached log
Comment 3 Michael Herger 2009-01-10 09:18:23 UTC
should be fixed in change 24559

*** This bug has been marked as a duplicate of bug 10391 ***