Closed (fixed)
Project:
Drupal driver for SQL Server and SQL Azure
Version:
4.3.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2021 at 10:18 UTC
Updated:
16 Nov 2021 at 15:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
daffie commentedThe fix. In this patch is also a small fix for the fact that in the class Insert the following code is deprecated:
return $stmt->fetchColumn(0);. I have changed it to:return $stmt->fetchField();. The parameter value does not need to be set, because it is the default value.Comment #3
beakerboyDoes the lack of ExceptionHandler cause any test failures?
Comment #4
daffie commentedYes, they do. I can find out for you if you need it.
Comment #5
beakerboyYes, please. I'd like to run just a failing test with and without the patch first to make sure it gets resolved before running the entire suite. For some reason the patch is not applying. Could you either reroll it against the existing 4.3.x branch or pass on a merge request on the issue fork? It looks like Truncate and Update are the problems.
Edit: never mind. It looks like this patch contains some of the changes from the first patch you submitted. It doesn’t apply because those changes have already been made. I think the
git apply —rejectoption will take care of it.Comment #8
daffie commentedHas been committed.
Comment #9
beakerboyHas been Cherry-picked into 4.2.x as well. The new file has been added, but nothing else yet.
Comment #10
beakerboyI think the provided patch has a bug:
// Match all SQLSTATE 23xxx errors.
+ if (substr($e->getCode(), -6, -3) == '23') {
+ throw new IntegrityConstraintViolationException($message, $e->getCode(), $e);
+ }
+ else {
+ throw new DatabaseExceptionWrapper($message, 0, $e);
+ }
This seems like it was copied/pasted from psql driver. The code in the ExceptionWrapper uses '42' instead of '23'. which is correct? why not just use:
I'm going to have to look closer at these patches before merging...
Comment #11
beakerboyComment #14
beakerboyNow to fix 4.3.
Comment #15
beakerboy