Opened 13 years ago
Closed 8 years ago
#9712 closed defect (wontfix)
IntegrityError in the database backend
Reported by: | Owned by: | Morris | |
---|---|---|---|
Priority: | high | Component: | FlexibleAssignToPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
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 http://trac.edgewall.org/wiki/TracDev/DatabaseApi#Parameterpassing
Python Traceback
File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/main.py", line 522, in _dispatch_request dispatcher.dispatch(req) File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/web/main.py", 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/main.py", 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/flexibleassignto.py", line 167, in post_process_request next_action_obj) File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/flexibleassignto.py", line 193, in _build_select self._ensure_user_data(user_objs) File "/Library/Python/2.6/site-packages/FlexibleAssignTo-0.7.13-py2.6.egg/flexibleassignto/flexibleassignto.py", 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/util.py", 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/sqlite_backend.py", 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/sqlite_backend.py", line 56, in execute args or []) File "/Library/Python/2.6/site-packages/Trac-0.12.3dev_r10921-py2.6.egg/trac/db/sqlite_backend.py", 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 (5)
comment:1 follow-up: 2 Changed 13 years ago by
comment:2 Changed 13 years ago by
Replying to kailash.buki@gmail.com:
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 13 years ago by
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 12 years ago by
Status: | new → 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.
comment:5 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
The plugin is deprecated in Trac 1.3.2 and later. To customize the list of users that appear in the assign-to list, subclass ConfigurableTicketWorkflow
and override the get_allowed_owners
method.
Whoops the actual configuration settings was like this: