Files
gerrit/gerrit-server
David Ostrovsky 98b13a9809 MysqlAccountPatchReviewStore: Fix duplicate key detection
The detection code is checking against SQL error code, even though
the SQL state is retrieved from the SQLException. As the consequence,
duplicate key state is not detected and primary key violation error
is reported during REST API call.

To rectify, retrieve the error code number from the SQL exception to
correctly detect duplicate key error. This approach is also based on
gwtorm code that is also using SQLException#getErrorCode() method.

Bug: Issue 10664
Change-Id: I678419a84af287edd8d121bddd2d11c2ed72eefe
2019-06-16 18:01:29 +02:00
..
2016-06-29 11:17:52 +09:00
2016-06-14 21:12:02 +02:00