Modify ↓
Opened 15 years ago
Closed 14 years ago
#5450 closed defect (duplicate)
DB error when adding additonal tickets to blockedby/blocking
Reported by: | vArDo | Owned by: | Noah Kantrowitz |
---|---|---|---|
Priority: | normal | Component: | MasterTicketsPlugin |
Severity: | normal | Keywords: | |
Cc: | mateusz@…, asterix@… | Trac Release: | 0.11 |
Description
When I try to add additional ticket to Blockedby field (the same with 'blocking' field) I get the following error:
File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 339, in send_error 'text/html') File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 702, in render_template if not req.session or not int(req.session.get('accesskeys', 0)): File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 169, in __getattr__ value = self.callbacks[name](self) File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 257, in _get_session return Session(self.env, req) File "/usr/lib/python2.5/site-packages/trac/web/session.py", line 150, in __init__ self.get_session(req.authname, authenticated=True) File "/usr/lib/python2.5/site-packages/trac/web/session.py", line 164, in get_session super(Session, self).get_session(sid, authenticated) File "/usr/lib/python2.5/site-packages/trac/web/session.py", line 56, in get_session (sid, int(authenticated))) File "/usr/lib/python2.5/site-packages/trac/db/util.py", line 50, in execute return self.cursor.execute(sql_escape_percent(sql), args) File "/usr/lib/python2.5/site-packages/trac/db/util.py", line 50, in execute return self.cursor.execute(sql_escape_percent(sql), args) InternalError: current transaction is aborted, commands ignored until end of transaction block
This is what I get in PostgreSQL logs:
2009-06-29 21:07:07 CEST ERROR: duplicate key value violates unique constraint "mastertickets_pkey" 2009-06-29 21:07:07 CEST STATEMENT: INSERT INTO mastertickets (dest, source) VALUES (5121, E'1005') 2009-06-29 21:07:07 CEST ERROR: current transaction is aborted, commands ignored until end of transaction block 2009-06-29 21:07:07 CEST STATEMENT: SELECT last_visit FROM session WHERE sid=E'vArDo' AND authenticated=1 2009-06-29 21:07:07 CEST ERROR: current transaction is aborted, commands ignored until end of transaction block 2009-06-29 21:07:07 CEST STATEMENT: SELECT last_visit FROM session WHERE sid=E'vArDo' AND authenticated=1
You can test this behaviour at Gajim's Trac: http://trac.gajim.org/ticket/5121 :
Steps to repro:
- remove all tickets from blockedby
- add one ticket to blockedby
- add additional ticket to blockedby <-- you will see the above-mentioned error
Attachments (2)
Change History (5)
comment:1 Changed 15 years ago by
Cc: | asterix@… added |
---|
comment:2 Changed 15 years ago by
Changed 15 years ago by
Attachment: | matertickets-alter.sql added |
---|
Use with care, it drops the table and recreates it. Save a backup of the data first!!!!
Changed 15 years ago by
Attachment: | masterticket-toint.diff added |
---|
Changes the way that the tickets id are passed
comment:3 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Fixed in the new MasterTickets 3.0 line of development.
See #2658.
Note: See
TracTickets for help on using
tickets.
Hi there!
We had to change the masterticket table definition for postgres to use INTEGER instead of TEXT for the fields.
And also had to apply a patch to the code to solve that issue. They'll a bit naive, since maybe there're other parts of the code that aren't postgres friendly, but that's a start.
I'll upload both changes next.