Replace wrong uses of SQLstate class 08 (connection error) (#8739) #8740
+5
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for #8739
Except for
bad_db_handle
, I've replaced the invalid handle errors that were associated with08003
withHY000
(CLI-specific condition - invalid handle as defined in ISO/IEC 9075-9), as already used by for examplebad_svc_handle
. We could also opt to define a custom subclass ofHY
for our use (the standard explicitly allows this, as the invalid handle error has no subclass, which means it must either be000
, or implementation-specific, i.e. a subclass starting with 5-9 or I-Z), as HY000 is pretty generic.One could also argue that it can be
42000
(syntax error or access rule violation as defined in ISO/IEC 9075-2), as already used bybad_req_handle
,bad_segstr_handle
.The error
alias_conflict_err
of the original issues was changed to42000
, just like its siblingsprocedure_conflict_error
andrelation_conflict_error
already used.The error
batch_open
was changed from08002
toHY010
(CLI-specific condition - function sequence error as defined in ISO/IEC 9075-9), as that seems to match cases in the standard (book 9), where the error is a result of the user calling API functions out of sequence. It can be argued it can be42000
(syntax error or access rule violation as defined in ISO/IEC 9075-2) as well.