Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

test: correctly return tx id for update counts#4045

Merged
rahul2393 merged 1 commit intomainfrom
return-tx-id-for-execute-streaming-sql
Sep 15, 2025
Merged

test: correctly return tx id for update counts#4045
rahul2393 merged 1 commit intomainfrom
return-tx-id-for-execute-streaming-sql

Conversation

@olavloite
Copy link
Copy Markdown
Collaborator

The mock Spanner server did not correctly return the transaction ID when ExecuteStreamingSql was used in combination with an update count result.

Instead of returning the transaction ID of the transaction that was actually started, it returned the transaction ID that was set on the request. This would be empty for requests that used a Begin transaction selector, which again meant that it would return an empty transaction ID.

This change also returns the UPDATE_COUNT field in the result set, which is also not returned by real Spanner.

The mock Spanner server did not correctly return the transaction ID when
ExecuteStreamingSql was used in combination with an update count result.

Instead of returning the transaction ID of the transaction that was
actually started, it returned the transaction ID that was set on the
request. This would be empty for requests that used a Begin transaction
selector, which again meant that it would return an empty transaction ID.

This change also returns the UPDATE_COUNT field in the result set, which
is also not returned by real Spanner.
@olavloite olavloite requested review from a team September 14, 2025 06:29
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Sep 14, 2025
@olavloite olavloite requested a review from rahul2393 September 14, 2025 06:57
@rahul2393 rahul2393 merged commit 29c5d7f into main Sep 15, 2025
42 checks passed
@rahul2393 rahul2393 deleted the return-tx-id-for-execute-streaming-sql branch September 15, 2025 08:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants