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:

  1. remove all tickets from blockedby
  2. add one ticket to blockedby
  3. add additional ticket to blockedby <-- you will see the above-mentioned error

Attachments (2)

matertickets-alter.sql (217 bytes) - added by Leandro Conde 14 years ago.
Use with care, it drops the table and recreates it. Save a backup of the data first!!!!
masterticket-toint.diff (1.6 KB) - added by Leandro Conde 14 years ago.
Changes the way that the tickets id are passed

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 years ago by asterix

Cc: asterix@… added

comment:2 Changed 14 years ago by Leandro Conde

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.

Changed 14 years ago by Leandro Conde

Attachment: matertickets-alter.sql added

Use with care, it drops the table and recreates it. Save a backup of the data first!!!!

Changed 14 years ago by Leandro Conde

Attachment: masterticket-toint.diff added

Changes the way that the tickets id are passed

comment:3 Changed 14 years ago by Frau Boonekamp

Resolution: duplicate
Status: newclosed

Fixed in the new MasterTickets 3.0 line of development.

See #2658.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.