tiny_tds icon indicating copy to clipboard operation
tiny_tds copied to clipboard

Client should raise error on failed execution

Open scbabacus-midnight opened this issue 5 years ago • 2 comments

Environment

Debian (Docker) Image ruby:2

I am wondering if execute should raise TinyTds::Error on failed execution?
See more info here: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/717

To summarize the consumer got false as a return value which IMO totally unexpected.
I wonder did you forgot to raise an error in ruby instead of returning false from the native C to the consumer?

scbabacus-midnight avatar Dec 23 '19 05:12 scbabacus-midnight

cc @metaskills https://github.com/rails-sqlserver/tiny_tds/commit/2a8b8e9489f3a619e6d79e9cf8525be7f802c2bf

scbabacus-midnight avatar Dec 23 '19 05:12 scbabacus-midnight

This seems like a plausible bug to me. Is it possible to write a new TinyTDS test case to verify the expected behavior?

aharpervc avatar Dec 30 '19 20:12 aharpervc