Edgewall Software

Changes between Initial Version and Version 2 of Ticket #4794


Ignore:
Timestamp:
Feb 20, 2007, 8:23:46 PM (17 years ago)
Author:
Christian Boos
Comment:

Seems this is PostgreSQL specific (works fine with SQLite and MySQL).

With PostgreSQL, #2147483647 works but #2147483647+1 doesn't ;-) So yes, checking against sys.maxint seems the right thing to do (would be worth a check on a 64-bits machine, though).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4794 – Description

    initial v2  
    11If you have "#12222222 22222222" (I put the space in there only so trac's trac doesn't crash due to this same bug) on a Wiki page or in a subversion commit log, trac tries to look up that ticket number. If the number is larger than maxint, there is an error. This makes the revision log and the timeline unusable. I'm not sure if it is strictly a postfix problem or not. I fixed it by adding
    2 
     2{{{
    33if long(target) < maxint
    4 
     4}}}
    55to api.py, just before:
    6 
     6{{{
    77                cursor = formatter.db.cursor()
    88                cursor.execute("SELECT summary,status FROM ticket WHERE id=%s",
     
    1313                                  title=shorten_line(row[0]) + ' (%s)' % row[1],
    1414                                  href=formatter.href.ticket(target))
    15 
     15}}}
    1616and indenting those lines (at about line 215). Of course, I added "from sys import maxint" at the top.
    1717