Modify

Opened 6 years ago

Closed 6 years ago

#4178 closed defect (fixed)

postgres bug fix [PATCH]

Reported by: mixedpuppy Owned by: otaku42
Priority: normal Component: TracPastePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The latest change broke compatibility with the LIMIT clause, it needs to be LIMIT X OFFSET X rather than LIMIT X,X. Patch to come.

Attachments (1)

pasteplugin-limit.patch (515 bytes) - added by mixedpuppy 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by mixedpuppy

comment:1 Changed 6 years ago by otaku42

  • Owner changed from mitsuhiko to otaku42
  • Status changed from new to assigned
  • Trac Release changed from 0.10 to 0.11

Thanks for the patch, will look at it.

comment:2 Changed 6 years ago by otaku42

Hmm... the LIMIT x,x syntax was also used before r4891. Did earlier revisions really work for you?

I did a quick test, and your patch seems to break the "Recent Pastes" functionality when using SQLite. I'll give it a closer look, but likely not before sometimes next week.

comment:3 Changed 6 years ago by mixedpuppy

well, I svn updated today, after which I got the following error just accessing /pastebin:

Trac detected an internal error:

ProgrammingError: LIMIT #,# syntax is not supported
HINT: Use separate LIMIT and OFFSET clauses.

Making the change allowed me to bring up pastebin, but I haven't tested beyond that. One other change on my end, updated pg 8.3.4 to 8.3.5.

comment:4 Changed 6 years ago by otaku42

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4894]) TracPastePlugin: Correct use of LIMIT and OFFSET in limit_clause, to
make it compatible (again?) with PostgreSQL. While at it, allow the
offset to be set as additional filter when calling the method.

Thanks to mixedpuppy for reporting this issue.

Closes #4178.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from otaku42. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.