Bugzilla – Bug 8703
Genre sorting broken in web & SBC UIs
Last modified: 2008-07-13 11:35:18 UTC
Sometime in the past month, the web & SBC UIs stopped sorting genre names when displaying the list of genres. No matter what the values are in the 'namesort' field, the genres get displayed in 'id' order. See http://forums.slimdevices.com/showthread.php?t=49737 for a discussion.
is this a dupe of the known mysql issue? which version of mysql is on your system? see bug 6748
I'm running MySQL Version: 5.0.51a which is the latest released community version. And yes, apparently, this version suffers from http://bugs.mysql.com/bug.php?id=32202. But I can't believe that this isn't a new SC bug. My genres have always displayed in the correct order until the past few weeks. I have to believe that a "group by id" clause has crept into SC's genre queries and has thus unmasked this bug. Rather than wait until the next release of MySQL for this problem to go away, shouldn't SC's genre query be fixed to remove the entirely spurious "group by ID" clause which is the cause of this bug? The clause does absolutely nothing (any group by clause on a key index, by definition, does nothing) except slow down the query. I expect the fix is pretty simple.
This is the SQL query that SC passes to mysql to get my genre list: SELECT me.id, me.name, me.namesort, me.namesearch, me.musicmagic_mixable FROM genres me GROUP BY me.id ORDER BY me.namesort LIMIT 36; If the useless "GROUP BY" clause could be eliminated from the query, this bug would be fixed.
*** This bug has been marked as a duplicate of bug 6748 ***
> If the useless "GROUP BY" clause could be eliminated from the query, this bug would be fixed. OK, I'm now convinced that this is easier said than done. I didn't really understand the magnitude of what I was asking for here. And I bow to KDF's judgment that this is a duplicate of 6748. Hopefully, a new community version of mysql will be released which fixes this bug sometime before SC 7.1 gets released. In the mean time, using MySQL enterprise 5.0.62 provides a work-around.