View Issue Details

IDProjectCategoryView StatusLast Update
0007690mantisbtdb mssqlpublic2014-05-16 15:00
Reporterrzg Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.1.0a4 
Fixed in Version1.1.0rc1 
Summary0007690: number_format(); bad for SQL statments
Description

See file_api line 200. We do a number_format, then use the formatted number in a SQL statment on line 230. This leads to SQL syntax errors since '7,428' isn't an integer.

Not MSSQL specific really.

TagsNo tags attached.

Activities

rzg

rzg

2006-12-31 02:55

reporter   ~0013885

That should read 200 and 230 respectively

vboctor

vboctor

2007-04-03 01:05

manager   ~0014298

Last edited: 2007-04-03 01:10

This bug will happen in the following case:

  1. The attachment file size is greater than or equal to 1000 and is previewable (e.g. jpg).
  2. $g_preview_attachments_inline_max_size is greater than the attachment file size.

The fix would be to replace number_format() with db_prepare_int(). This is in line 198 of the latest code.

grangeway

grangeway

2007-07-22 17:10

reporter   ~0015161

Hello,

From victor's comment, it would appear that this issue is already fixed in the latest code.

Paul

rzg

rzg

2007-07-23 19:41

reporter   ~0015195

Looking at CVS, it was never fixed...

vboctor

vboctor

2007-09-16 22:38

manager   ~0015645

The fix is now applied. It seems that MySQL doesn't complain on the code before the fix.

grangeway

grangeway

2014-05-16 15:00

reporter   ~0040403

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Thanks
Paul