View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0011892 | mantisbt | public | 2010-05-06 08:21 | 2012-07-13 06:29 | |
| Reporter | agronholm | Assigned To | dregad | ||
| Priority | high | Severity | major | Reproducibility | always |
| Status | closed | Resolution | unable to reproduce | ||
| Product Version | 1.2.1 | ||||
| Summary | 0011892: Email notifications fail on PostgreSQL | ||||
| Description | The email queue API uses the wrong sequence name on line 103 of core/email_queue_api.php. As a result, it tries to get the current value of a nonexistent sequence 'mantis_email_table_email_id_seq'. | ||||
| Steps To Reproduce | Change the status of a bug so it triggers an email notification to interested parties. | ||||
| Tags | patch | ||||
|
Assigning to David since he uses pgsql. |
|
|
mantis_email_table does actually have an "email_id" column so the correct solution is not to use db_insert_id( $t_email_table, 'id' ); The SQL executed when PGSQL is in use is: Where $p_table and $p_field are the two arguments to the db_insert_id function. I can't see why there would be a problem with the code. Are you able to reproduce this issue with a fresh MantisBT database (just installed) using MantisBT 1.2.3? |
|
|
The table does have an email_id column, that was never in question. The database, however, does NOT have the corresponding sequence ("mantis_email_table_email_id_seq"), which is why it fails. However, it seems that the latest version creates the database properly (with the aforementioned sequence name), so it could be a migration problem. |
|
|
By the way, why does the installer require me to specify a host name? I want to use the database via the UNIX domain socket. |
|
|
As mentioned by agronholm in 0011892:0027422, the installer does create the sequence properly in latest version, so I'm resolving this as unable to reproduce. |
|