Bug 8196

Summary: misspelled SQL query in org.apache.catalina.session.JDBCStore.keys() method
Product: Tomcat 4 Reporter: Seweryn Sobieszek <seweryn.sobieszek>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: P3    
Version: Unknown   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Seweryn Sobieszek 2002-04-17 09:56:23 UTC
The query SELECT COUNT(s.session_id), s.session_id FROM tomcat_sessions s,
tomcat_session c GROUP BY c.session_id does not it is supposed to do (as I think).
As I figured out it should return count of sessions with their identifiers, but 
it doesn't works properly on MySQL, and doesn't work on SQL92-compliant database
at all - attribute s.session_id isn't grouped but it should be.
The query should say: SELECT COUNT(s.session_id), c.session_id FROM
tomcat_sessions s, tomcat_session c GROUP BY c.session_id;
The bug is present in current CVS version.
Comment 1 Remy Maucherat 2002-04-17 17:03:23 UTC
This was already submitted a while ago, actually. Unfortunately, none of the
committers (me included) are apparently too interested in maintaining the
component, so the patch got ignored. I'll apply it.

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