Opened 5 years ago

Last modified 5 years ago

#9712 assigned defect

IntegrityError in the database backend

Reported by: kailash.buki@… Owned by: gt4329b
Priority: high Component: FlexibleAssignToPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12


While using flexibleassignto plugin with configuration options

ensure_user_data = false
use_custom_get_known_users = false

. But as i try to view the ticket page, i am getting an IntegrityError in the sqlite backend. As far as i could figure out, flexibleassignto plugin is trying to execute an SQL <EMAIL_SQL % (_username, _email)> which is bad as pointed in

Python Traceback

File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/", line 522, in _dispatch_request
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/", line 254, in dispatch
  self._post_process_request(req, *resp)
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/", line 363, in _post_process_request
  resp = f.post_process_request(req, *resp)
File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/", line 167, in post_process_request
File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/", line 193, in _build_select
File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/", line 250, in _ensure_user_data
  cursor.execute(EMAIL_SQL % (_username, _email))
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 66, in execute
  return self.cursor.execute(sql)
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 78, in execute
  result = PyFormatCursor.execute(self, *args)
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 56, in execute
  args or [])
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/", line 48, in _rollback_on_error
  return function(self, *args, **kwargs)

System Information

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7

Trac	0.12.3dev-r10921
Docutils	0.8
Genshi	0.6
Pygments	1.4
pysqlite	2.4.1
Python	2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)]
pytz	2011h
setuptools	0.6
SQLite	3.6.12
Subversion	1.6.16 (r1073529)
jQuery	1.4.4

Attachments (0)

Change History (4)

comment:1 in reply to: ↑ description ; follow-up: Changed 5 years ago by kailash.buki@…

Whoops the actual configuration settings was like this:

ensure_user_data = true
use_custom_get_known_users = true

comment:2 in reply to: ↑ 1 Changed 5 years ago by gt4329b

Replying to

Whoops the actual configuration settings was like this:

ensure_user_data = true
use_custom_get_known_users = true

Is that all the error output? The stack trace in the description doesn't show the IntegrityError..

comment:3 Changed 5 years ago by kailash.buki@…

The actual error was

Trac detected an internal error:
IntegrityError: columns sid, authenticated, name are not unique

I just posted the summary in my earlier post.

comment:4 Changed 5 years ago by gt4329b

  • Status changed from new to assigned

I haven't had a chance to look at this yet - and I likely won't for some time :/ Still, it smells like a legitimate bug (or at least a tricky config problem), so if you want to dig into it and submit a patch for any bugs you find, I'll try to take a look and apply it when I can.

Add Comment

Modify Ticket

as assigned The owner will remain gt4329b.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.