Bug 8196 - misspelled SQL query in org.apache.catalina.session.JDBCStore.keys() method
misspelled SQL query in org.apache.catalina.session.JDBCStore.keys() method
Status: RESOLVED DUPLICATE of bug 7170
Product: Tomcat 4
Classification: Unclassified
Component: Catalina
Unknown
All All
: P3 major (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2002-04-17 09:56 UTC by Seweryn Sobieszek
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***