Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle empty rows #157

Merged
merged 2 commits into from
Oct 15, 2020
Merged

Handle empty rows #157

merged 2 commits into from
Oct 15, 2020

Conversation

ntnn
Copy link
Contributor

@ntnn ntnn commented Oct 15, 2020

Description

@fwilhelm92 found a hang in database/sql when executing a .Query method on database/sql that doesn't yield any rows. We traced that to database/sql's inability to handle a nil rows.
Additionally I've found that database/sql panics on a nil rows on db.Query methods.

This PR changes the purego implementation to always return a valid driver.Rows and handles being effectively empty.

Related issues

Link any related issues here.

Tests

  • make lint
  • make test-go / make test-cgo
  • make integration-go / make integration-cgo

@ntnn ntnn requested a review from a team as a code owner October 15, 2020 08:03
@ntnn ntnn merged commit 99ed7ef into SAP:master Oct 15, 2020
@ntnn ntnn deleted the handle_empty_rows branch October 15, 2020 08:07
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