View Issue Details

IDProjectCategoryView StatusLast Update
0020483mantisbtdb postgresqlpublic2016-06-12 00:42
Reportercproensa Assigned Tocproensa  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-rc.1 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0020483: Error 401 with PostgreSQL manage_user_page
Description

Using PostgreSQL, on manage_user_page
selecting:
Hide Inactive = ON
Show Disabled = OFF

The query fails with attached message

Additional Information


APPLICATION ERROR 0000401
Database query failed. Error received from database was #-1: ERROR: operator does not exist: boolean < integer
LINE 3: AND ($1 < last_visit + 604800)
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. for the query: SELECT * FROM mantis_user_table
WHERE (1 = 1) AND enabled = $1
AND ($1 < last_visit + 604800)
ORDER BY username ASC.

TagsNo tags attached.

Relationships

related to 0020479 closeddregad Error 401 db_query bind params starts with $2 
related to 0020894 closeddregad APPLICATION ERROR 401 @ user_edit_page when changing Accesslevel 

Activities

Related Changesets

MantisBT: master 4192d571

2016-01-07 10:13

cproensa

Committer: dregad


Details Diff
Fix pgsql query error manage_user_page

Due to pgsql having positional parameters in parametrized queries, the
page is throwing an error in some combination of conditions.

The error is caused by the reutilization of a prepared WHERE condition
in a string from previous query. In the new query, a db_param() call is
issued, which has the parameter reset to 1 (returning "$1"). Then,
the resulting query string contains two "$1" parameters for different
values.

With this commit, the query build code is cleaned to avoid said
situation.

Fixes 0020483

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Affected Issues
0020483
mod - manage_user_page.php Diff File