Modify ↓
#2051 closed defect (fixed)
columns sid, var_name are not unique during login
| Reported by: | Owned by: | Christopher Lenz | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | general | Version: | 0.8.4 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
I get the above Oops error message when switching back and forth between logged in and logged out areas of my site. This is running under mod_python 3.1.4 + apache 2.0.54.
traceback:
Traceback (most recent call last):
File "/usr/local/trac/lib/python2.4/site-packages/trac/ModPythonHandler.py", line 195, in handler
core.dispatch_request(mpr.path_info, args, mpr, env)
File "/usr/local/trac/lib/python2.4/site-packages/trac/core.py", line 433, in dispatch_request
req.session = Session.Session(env, req, newsession)
File "/usr/local/trac/lib/python2.4/site-packages/trac/Session.py", line 51, in __init__
self.get_session(sid)
File "/usr/local/trac/lib/python2.4/site-packages/trac/Session.py", line 114, in get_session
self.update_sess_time()
File "/usr/local/trac/lib/python2.4/site-packages/trac/Session.py", line 101, in update_sess_time
self['mod_time'] = now
File "/usr/local/trac/lib/python2.4/site-packages/trac/Session.py", line 59, in __setitem__
return self.set_var(key, val)
File "/usr/local/trac/lib/python2.4/site-packages/trac/Session.py", line 141, in set_var
self.sid, self.req.authname, key, val)
File "/usr/src/build/539311-i386/install//usr/lib/python2.4/site-packages/sqlite/main.py", line 255, in execute
IntegrityError: columns sid, var_name are not unique
Attachments (1)
Change History (5)
comment:1 by , 20 years ago
| Milestone: | → 0.9 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
by , 20 years ago
Patch that adds the authenticated column to the table key
comment:3 by , 20 years ago
The attached patch provides a database upgrade that adds the authenticated column to the compound key of the session table. Seems to work with both SQLite and PostgreSQL.
Can someone else please test whether this creates any problems?
Note:
See TracTickets
for help on using tickets.



The
authenticatedcolumn should be part of the compound key of the session table. Grr, another DB upgrade script :-P