Opened 18 years ago
Closed 18 years ago
#3091 closed defect (bug) (fixed)
_max_num_pages can create ambiguities (and thereby db errors)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | Administration | Keywords: | bg|has-patch _max_num_pages db |
Focuses: | Cc: |
Description
By using this expression: "SELECT COUNT(DISTINCT ID)" the function _max_num_pages creates an ambiguity any time a db request has joined the users and posts tables, as both tables have ID fields.
(This could happen for example if you're trying to return posts based on a search of user names.)
Since the ID in _max_num_pages could not be used for any other field than that of ID in the posts table, there's no reason not to disambiguate it, as my patch does.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [4155]) Resolve table ambiguity.Props filosofo. fixes #3091