Skip to content

Commit a9360e2

Browse files
test: verify db_id and stmt_id in QueryRequest V1 round-trip
The V1 (>255 params) round-trip test only checked params but not db_id or stmt_id, unlike the equivalent ExecRequest test which checks all three fields. A V1-specific offset bug could corrupt db_id/stmt_id without being caught. Closes #172. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7f1a9a3 commit a9360e2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/test_messages_requests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ def test_roundtrip_v1_more_than_255_params(self) -> None:
229229
encoded = encode_message(msg)
230230
decoded = decode_message(encoded, is_request=True)
231231
assert isinstance(decoded, QueryRequest)
232+
assert decoded.db_id == 1
233+
assert decoded.stmt_id == 2
232234
assert list(decoded.params) == params
233235

234236

0 commit comments

Comments
 (0)