View Issue Details

IDProjectCategoryView StatusLast Update
0024393mantisbtdb mssqlpublic2018-05-16 02:20
Reporterrafique.kakatiAssigned To 
PriorityhighSeveritymajorReproducibilityhave not tried
Status newResolutionopen 
Product Version2.11.1 
Target VersionFixed in Version 
Summary0024393: APPLICATION ERROR 0000401 Database query failed. Error received from database was #-52: SQLState: IMSSP
Description

When I am trying to Print Reports and Issue Trends of a project whose tickets are greater than 2100, i am getting below error. this is not in the case of csv or excel exports. Please can you help me regarding the same. Attaching the image for the same

APPLICATION ERROR 0000401

Database query failed. Error received from database was #-52: SQLState: IMSSP
Error Code: -52
Message: Tried to bind parameter number 2101. SQL Server supports a maximum of 2100 parameters.
for the query: SELECT n.id, n.bug_id, n.reporter_id, n.view_state, n.last_modified, n.date_submitted, b.project_id FROM mantis_bugnote_table n JOIN mantis_bug_table b ON (n.bug_id = b.id) WHERE n.bug_id IN (?, ?, ?,

TagsNo tags attached.

Activities

rafique.kakati

rafique.kakati

2018-05-03 04:52

reporter  

printissue.png (159,774 bytes)
printissue.png (159,774 bytes)
rafique.kakati

rafique.kakati

2018-05-04 11:14

reporter   ~0059738

Hi,

While searching for the solution of above, found the below link where in they have mentioned that SQL Server Parameters per user-defined function limit is 2,100, below is the link.

https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-2017

Can you please help me to modify the query (bug_api.php) so that this issue can be resolved, where in all the data can be printed with this restriction.

function bug_get_bugnote_stats_array( array $p_bugs_id, $p_user_id = null ) {

$t_query = 'SELECT n.id, n.bug_id, n.reporter_id, n.view_state, n.last_modified, n.date_submitted, b.project_id'
. ' FROM {bugnote} n JOIN {bug} b ON (n.bug_id = b.id)'
. ' WHERE n.bug_id IN (' . implode( ', ', $t_in_clause_elems ) . ')'
. ' ORDER BY b.project_id, n.bug_id, n.last_modified';

}

rafique.kakati

rafique.kakati

2018-05-16 02:20

reporter   ~0059826

Hi,

Is there any solution for the same?

Issue History

Date Modified Username Field Change
2018-05-03 04:52 rafique.kakati New Issue
2018-05-03 04:52 rafique.kakati File Added: printissue.png
2018-05-04 11:14 rafique.kakati Note Added: 0059738
2018-05-16 02:20 rafique.kakati Note Added: 0059826