Skip to content

Pure rust "connection rejected" regression fixed - #189

Merged
fernandobatels merged 1 commit into
masterfrom
fix-conn-rust
Sep 9, 2026
Merged

fernandobatels merged 1 commit into
masterfrom
fix-conn-rust

Conversation

@fernandobatels

Copy link
Copy Markdown
Owner

76621aa(#179) made read_with() preserve unconsumed bytes across calls instead of silently dropping them. That surfaced two latent bugs that were previously harmless only because leftovers were discarded:

  • execute2's closure called parse_response() right after parse_sql_response(), but the trailing op_response is framed with its own op_code like every other response on the wire. Skipping it left the response's own [op_code=9] sitting in pending, which the next read (e.g. commit_retaining) misread as the following operation's op_code, producing "Connection rejected with code 1 (Connect)".
  • parse_status_vector() had no arm for isc_arg_warning (18). Any status vector containing a warning (e.g. from CREATE USER) hit the catch-all "Invalid / Unknown status vector item" error before consuming the warning's code word, leaving pending misaligned for every subsequent read and cascading into garbage op_codes during rollback/detach.

76621aa(#179) made read_with() preserve unconsumed bytes across calls
instead of silently dropping them. That surfaced two latent bugs that
were previously harmless only because leftovers were discarded:
- execute2's closure called parse_response() right after
  parse_sql_response(), but the trailing op_response is framed with
  its own op_code like every other response on the wire. Skipping it
  left the response's own [op_code=9] sitting in pending, which the
  next read (e.g. commit_retaining) misread as the following
  operation's op_code, producing "Connection rejected with code 1
  (Connect)".
- parse_status_vector() had no arm for isc_arg_warning (18). Any
  status vector containing a warning (e.g. from CREATE USER) hit the
  catch-all "Invalid / Unknown status vector item" error before
  consuming the warning's code word, leaving pending misaligned for
  every subsequent read and cascading into garbage op_codes during
  rollback/detach.
@fernandobatels fernandobatels self-assigned this Sep 8, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 34219335725

Coverage at 43.45% (no base build to compare)

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 5 uncovered changes across 2 files (0 of 5 lines covered, 0.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
rsfbclient-rust/src/client.rs 4 0 0.0%
rsfbclient-rust/src/wire.rs 1 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 6748
Covered Lines: 2932
Line Coverage: 43.45%
Coverage Strength: 194.92 hits per line

💛 - Coveralls

@fernandobatels
fernandobatels merged commit 1023f86 into master Sep 9, 2026
70 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants