Opened 14 years ago
Closed 14 years ago
#10170 closed defect (fixed)
session purge don't purge session_attribute
Reported by: | Owned by: | Remy Blank | |
---|---|---|---|
Priority: | high | Milestone: | 0.12.3 |
Component: | admin/console | Version: | 0.12-stable |
Severity: | normal | Keywords: | session purge bitesized |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
session purge calls _do_purge from web/session.py [1]
There all session rows older then age are deleted. In a secound step all session_attribute which link to a session older then age are deleted. As the sessions are alredy deleted nothing happens.
A call which deletes all session_attribute not linking to a session would to the trick.
DELETE FROM session_attribute WHERE sid NOT IN (SELECT sid FROM session);
For sqlite a vacuum call would be nice to resize the database.
[1] http://trac.edgewall.org/browser/branches/0.12-stable/trac/web/session.py#L485
Attachments (0)
Change History (2)
comment:1 by , 14 years ago
Component: | general → admin/console |
---|---|
Keywords: | bitesized added |
Owner: | set to |
Priority: | normal → high |
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [10689], with an updated unit test.
Indeed, that's wrong. Your suggestion of deleting all attributes not linked to a session makes perfect sense, as this will also remove any stale attributes that may still be left around.
Would you like to try and provide a patch?