Skip to content

Commit

Permalink
Merge pull request #560 from andyundso/raise-error
Browse files Browse the repository at this point in the history
Raise error if dbsqlsend fails
  • Loading branch information
andyundso authored Jul 13, 2024
2 parents 96e552e + b4243e9 commit 2673569
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Drop support for Ruby < 2.7
* Drop support for SQL Server < 2017
* Drop support for FreeTDS < 1.0
* Raise error if FreeTDS is unable to sent command buffer to the server

## 2.1.7
* Add Ruby 3.3 to the cross compile list
Expand Down
3 changes: 1 addition & 2 deletions ext/tiny_tds/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@ static VALUE rb_tinytds_execute(VALUE self, VALUE sql) {
REQUIRE_OPEN_CLIENT(cwrap);
dbcmd(cwrap->client, StringValueCStr(sql));
if (dbsqlsend(cwrap->client) == FAIL) {
rb_warn("TinyTds: dbsqlsend() returned FAIL.\n");
return Qfalse;
rb_raise(cTinyTdsError, "failed dbsqlsend() function");
}
cwrap->userdata->dbsql_sent = 1;
result = rb_tinytds_new_result_obj(cwrap);
Expand Down

0 comments on commit 2673569

Please sign in to comment.