Edgewall Software
Modify

Opened 19 years ago

Closed 18 years ago

Last modified 17 years ago

#2051 closed defect (fixed)

columns sid, var_name are not unique during login

Reported by: pfnguyen@… 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 Christopher Lenz)

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)

2051.diff (2.2 KB ) - added by Christopher Lenz 18 years ago.
Patch that adds the authenticated column to the table key

Download all attachments as: .zip

Change History (5)

comment:1 by Christopher Lenz, 18 years ago

Milestone: 0.9
Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

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

comment:2 by Christopher Lenz, 18 years ago

Description: modified (diff)

(Fixed description)

by Christopher Lenz, 18 years ago

Attachment: 2051.diff added

Patch that adds the authenticated column to the table key

comment:3 by Christopher Lenz, 18 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?

comment:4 by Christopher Lenz, 18 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in [2418].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.