apache / apache/shardingsphere
Add error handling for BLOB operations in Firebird Proxy
- Dominant language
- Java
- Stars
- 20.8k
- Forks
- 6.9k
- Avg merge
- 11h 38m
- Merged PRs (30d)
- 326
Description
## Feature Request
**Is your feature request related to a problem?**
BLOB operations in Firebird Proxy currently have no error handling: invalid requests are silently accepted instead of returning proper Firebird status vectors, which can lead to silent data loss (e.g. NULL inserted instead of BLOB content).
Error responses for Firebird Proxy are not merged yet and are in review in #38927. Once that PR is merged, BLOB operations should be extended to use it.
**Describe the feature you would like.**
After #38927 is merged, add error handling for BLOB operations:
- op_put_segment / op_batch_segments with an unknown BLOB handle should return isc_bad_segstr_handle instead of a success response
- op_open_blob / op_open_blob2 with an unknown BLOB id should return isc_bad_segstr_id instead of registering an empty BLOB
- segments received after the buffered BLOB size limit was exceeded (isc_blobtoobig) should keep failing instead of being accepted again
- op_put_segment after op_close_blob should return an error instead of appending to a closed BLOB
- executing a statement with a BLOB parameter referencing an unknown or unclosed BLOB should return an error instead of binding NULL
Contributor guide
Research direction
First review PR #38927 for the Firebird Proxy error-response mechanism, then trace op_put_segment, op_batch_segments, op_open_blob, op_open_blob2, op_close_blob, and statement execution handling. Done means invalid handles and IDs, oversized or closed BLOBs, and unknown or unclosed BLOB parameters return errors instead of being accepted or bound as NULL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100