View Issue Details

IDProjectCategoryView StatusLast Update
0012418mantisbtfilterspublic2011-10-24 18:31
Reportersveyret Assigned Todaryn  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.3 
Fixed in Version1.2.5 
Summary0012418: SQL error when a field has a ?
Description

I have a value for a custom field which contains a “?”. If I select this value in the filter, I have an application error:

APPLICATION ERROR 0000401

Échec de la requête de base de données. L'erreur renvoyée par la base de données était 0001064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''XTP 3.6' at line 1 pour la requête : SELECT Count( DISTINCT mantis_bug_table.id ) as idcnt FROM mantis_project_table, mantis_bug_table LEFT JOIN mantis_custom_field_string_table mantis_custom_field_string_table_2 ON mantis_custom_field_string_table_2.bug_id = mantis_bug_table.id AND mantis_custom_field_string_table_2.field_id = 2 WHERE mantis_project_table.enabled = ? AND mantis_project_table.id = mantis_bug_table.project_id AND ( mantis_bug_table.project_id = 94 ) AND ( mantis_bug_table.status in (?, ?, ?, ?, ?, ?) ) AND (mantis_custom_field_string_table_2.value = 'XTP 3.6 ?').

Merci d'utiliser le bouton « Précédent » de votre navigateur web pour retourner à la page précédente. Vous pourrez y corriger les problèmes identifiés par cette erreur ou choisir une autre action. Vous pouvez aussi choisir une option de la barre de menu pour aller directement dans une nouvelle section.

TagsNo tags attached.
Attached Files
select.jpg (39,822 bytes)   
select.jpg (39,822 bytes)   

Activities

daryn

daryn

2010-12-22 16:55

reporter   ~0027679

The query was not properly using db_query_bound in some instances.

jder

jder

2011-01-20 09:46

reporter   ~0028017

This issue is not fixed in version 1.2.4.
Why the status of this bug is resolved?
is it possible to get a patch?

atrol

atrol

2011-01-20 11:00

developer   ~0028019

Fixed in version is set to 1.2.x which means it will be available in next released version (1.2.5)
See "Related Changesets" below for the patch.
You can also download a nightly build to get some kind of 1.2.5 release candidate
http://www.mantisbt.org/builds

jder

jder

2011-01-20 12:34

reporter   ~0028020

The diff applyed on my 1.2.4. works fine, thanks.

Related Changesets

MantisBT: master 765735ba

2010-12-22 16:50

daryn


Details Diff
Fix Bug 0012418: SQL error when a field has a ? Affected Issues
0012418
mod - core/filter_api.php Diff File

MantisBT: master-1.2.x bbf5612a

2010-12-22 16:50

daryn


Details Diff
Fix Bug 0012418: SQL error when a field has a ? Affected Issues
0012418
mod - core/filter_api.php Diff File