rishi-rana opened a new pull request, #39773:
URL: https://github.com/apache/shardingsphere/pull/39773
Fixes 4 of the 5 sub-cases in #39052. The 5th (isc_blobtoobig) is split off
to #39772, per makssent's suggestion, since it needs a buffered-size-limit
design decision rather than just wiring an existing signal to an error.
Changes proposed in this pull request:
- `FirebirdOpenBlobCommandExecutor`: throw `InvalidSegstrIdException` on an
unknown BLOB id instead of registering an empty BLOB.
- `FirebirdPutBlobSegmentCommandExecutor` /
`FirebirdBatchBlobSegmentsCommandExecutor`: check `appendSegment()`'s
`OptionalInt` result and throw `InvalidSegstrHandleException` on an unknown or
already-closed handle instead of silently reporting success. This covers both
the "unknown handle" and "put after close" cases from the issue, since
`closeWrite()` removes the cache entry either way, so both hit the same signal.
- `FirebirdExecuteStatementCommandExecutor.bindBlobParameters()`: throw
`InvalidSegstrIdException` for an unknown or unclosed BLOB parameter instead of
silently binding `null`.
- Adds `InvalidSegstrHandleException`/`InvalidSegstrIdException` and their
`FirebirdVendorError`/`FirebirdDialectExceptionMapper` wiring, following the
error-handling pattern established in #38927. The gdscodes and SQL states
(`isc_bad_segstr_handle` / `isc_bad_segstr_id`, both SQLSTATE 42000) were
verified against the `jaybird` client jar's
`isc_error_sqlstates.properties`/`isc_error_msg.properties`, not guessed.
- Fixed `FirebirdOpenBlobCommandExecutorTest`'s existing `assertExecute`
test, which was unintentionally exercising the bug (an unregistered blob id)
and asserting success; it now seeds real content via
`FirebirdBlobBinaryProtocolValue`. Added
unknown-id/unknown-handle/put-after-close regression tests across all four
executors.
This pull request was drafted with assistance from Claude Code (Anthropic).
Affected scope: the two new exception classes, the
`FirebirdVendorError`/`FirebirdDialectExceptionMapper` wiring, the four
executor fixes listed above, and their corresponding unit tests. I reviewed and
verified all changes myself.
---
Before committing this PR, I'm sure that I have checked the following
options:
- [x] My code follows the [code of
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/)
of this project.
- [x] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the
pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [x] I have added corresponding unit tests for my changes.
- [x] I have updated the Release Notes of the current development version.
For more details, see [Update Release
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]