View Issue Details

IDProjectCategoryView StatusLast Update
0008179mantisbtdb postgresqlpublic2014-05-16 15:02
Reporteragrassi Assigned Tovboctor  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionduplicate 
PlatformUnixOSGNU/Linux 
Product Version1.1.0a3 
Summary0008179: Error in email_queue_add
Description

When trying to send e-mail, in file core/email_queue_api.php, in function email_queue_add, line 95, the function db_insert_id is called, which sends query "SELECT currval('mantis_email_table_id_seq');". But the sequence for the IDs of the table mantis_email_table is called 'mantis_email_table_email_id_seq'.

I don't know if the category of this issue should be db posgtresql or email.

Steps To Reproduce

Configure mantis so that it sends mail after some event, generate that event so that mantis tries to send an email.

TagsNo tags attached.

Relationships

duplicate of 0007616 closedgrangeway Can't create tables on postgresql 

Activities

agrassi

agrassi

2007-08-09 19:44

reporter   ~0015390

I think the problem is with function db_insert_id() in database_api.php, which makes an exception with pgsql databases. It sends a query for obtaning the ID through the value of the sequence used for the autoincrement of the primary key field, email_id. ADODB creates the sequence for the autoincrement of that field as mantis_email_table_email_id_seq, but the query sent to the database is hardcoded and constructs the name of the sequence as mantis_ematil_table_id.

I've seen that this is the same in 1.1.0a4. I also note that there is a function called pg_insert_id() in adodb-postgres64.inc.php (with a comment of not being tested) which would construct a correct query. Why isn't that used?

grangeway

grangeway

2014-05-16 15:02

reporter   ~0040557

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