Opened 13 years ago

Closed 13 years ago

#2369 closed patch (fixed)

mythmusic sql error when adding by genre to playlist

Reported by: chris.moewes@… Owned by: paulh
Priority: minor Milestone: unknown
Component: mythmusic Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

while playing a song, go to the smart playlist (m) and select add by genre. The query fails. Here is the output

Query was: SELECT song_id FROM music_songs LEFT JOIN music_artists ON music_songs.artist_id=music_artists.artist_id LEFT JOIN music_albums ON music_songs.album_id=music_albums.album_id LEFT JOIN music_genres ON music_songs.genre_id=music_genres.genre_id LEFT JOIN music_artists AS music_comp_artists ON music_albums.artist_id=music_comp_artists.artist_id WHERE genre = 'Blues' ORDER BY artist_name, album_name, track Driver error was [2/1052]: QMYSQL3: Unable to execute query Database error was: Column 'artist_name' in order clause is ambiguous

should be

SELECT song_id FROM music_songs LEFT JOIN music_artists ON music_songs.artist_id=music_artists.artist_id LEFT JOIN music_albums ON music_songs.album_id=music_albums.album_id LEFT JOIN music_genres ON music_songs.genre_id=music_genres.genre_id LEFT JOIN music_artists AS music_comp_artists ON music_albums.artist_id=music_comp_artists.artist_id WHERE genre = 'Blues' ORDER BY music_artists.artist_name, album_name, track;

Attachments (1)

music_artist_qualification_fix.diff (2.4 KB) - added by Colin Guthrie <mythtv@…> 13 years ago.
Patch which may fix the issue.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by Colin Guthrie <mythtv@…>

Patch which may fix the issue.

comment:1 Changed 13 years ago by Colin Guthrie <mythtv@…>

Type: defectpatch

Chris, are you able to test the attached patch and see if that fixes it for you. I cannot test at the moment, but will be able to do so over the next few days... In the mean time if you could try this patch and report whether or not it fixes issues for you that would be great.

Col.

comment:2 Changed 13 years ago by chris.moewes@…

Sorry I can't test it. I've only got an rpm based system and I can't get the svn mythplugins stuff to compile.

comment:3 Changed 13 years ago by paulh

Component: mythtvmythmusic

comment:4 Changed 13 years ago by paulh

Owner: changed from Isaac Richards to paulh

comment:5 Changed 13 years ago by paulh

(In [11368]) References #2369. MythMusic sql error when adding by genre to playlist.

Apply Colins patch - also needed a similar change to get 'By year' to work because the year field is also ambiguous.

comment:6 Changed 13 years ago by paulh

Resolution: fixed
Status: newclosed

(In [11369]) Merge [11368] from trunk. Fixes #2369. MythMusic sql error when adding by genre to playlist.

Apply Colins patch - also needed a similar change to get 'By year' to work because the year field is also ambiguous.

Note: See TracTickets for help on using tickets.