View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0028068 | mantisbt | db mssql | public | 2021-03-13 05:37 | 2022-02-08 04:43 |
Reporter | obmsch | Assigned To | dregad | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.26.0 | ||||
Target Version | 2.26.0 | ||||
Summary | 0028068: Impossible to insert child records with ADOdb 5.21.0 on mssql | ||||
Description | As reported by @obmsch in 0028015:0065205, with ADOdb 5.21.0 on MS SQL Server all MantisBT operations that require creating a base record and one or more related records in other tables fail. For example, but not limited to:
| ||||
Additional Information | Upstream bug report https://github.com/ADOdb/ADOdb/issues/692 | ||||
Tags | No tags attached. | ||||
@dregad do I understand right that the plan is not to fix the regression in ADOdb, but to offer a new method that has to be called by the client (MantisBT) to get the former behavior? |
|
@atrol Correct, but this decision is not final. The rationale is that to achieve the "Last Insert Id" functionality, the ADOdb MSSQL driver needs to execute a second query to retrieve the id after inserting the record; the performance hit for systematically doing this is quite high (nearly 3x slower, details here. This is not a big deal for interactive systems such as MantisBT, but a big issue for batch processing. This is a compromise with ADOdb's co-maintainer, who would like to keep the behavior as-is in 5.21; I am of a different opinion, and believe that we should disable the functionality for batch processing instead so I'm planning to discuss with him again. |
|
@obmsch, if you would like to test, please check out https://github.com/dregad/mantisbt/tree/adodb-5.21 (you'll need to run |
|
Same for me. Without that, I expect breaking more projects than just MantisBT. |
|
@dregad Will try when I am back to my dev box. A remark on a first glance at the changes:
This might not yield the correct result if triggers are involved. For that reason the old |
|
Ah OK I didn't realize that. Will fix. |
|
Both the ADOdb PR and the MantisBT branch have been updated. |
|
@dregad looks good (patches applied to my 2.25.0 installation). Hope you convince Mark making |
|
@obmsch following your note 0029511:0066196
Can I mark this issue as resolved then ? |
|
@dregad just done a fresh installation MantisBT 2.25.2, ADOdb 5.21.4, PHP 7.4 (not the time to check 8.0, 8.1) with MSSQL. No problems. So no objections to resolve. |
|
Hello Martin, many thanks for taking the time to test this once again and providing feedback. |
|