Skip to content

Commit 30f0541

Browse files
committed
Use nogvl_dbsqlok
1 parent 7a0562e commit 30f0541

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/tiny_tds/client.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ static VALUE rb_tinytds_execute(VALUE self, VALUE sql) {
305305
if (cwrap->userdata->dbsql_sent) {
306306
// if we do not run dbsqlok, FreeTDS will throw an error
307307
// Attempt to initiate a new Adaptive Server operation with results pending
308-
// note that both of these operations are blocking as we do not have access to these
309-
// "NOGVL" methods from result.c
310308
if (cwrap->userdata->dbsqlok_sent == 0) {
311-
dbsqlok(cwrap->client);
309+
if(nogvl_dbsqlok(cwrap->client) != SUCCEED) {
310+
rb_raise(cTinyTdsError, "unable to acknowledge previous results with server");
311+
}
312312
}
313313

314314
dbcancel(cwrap->client);

0 commit comments

Comments
 (0)