Skip to content

Commit d331213

Browse files
committed
Use nogvl_dbsqlok
1 parent 26c8825 commit d331213

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/tiny_tds/client.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,10 @@ static VALUE rb_tinytds_execute(VALUE self, VALUE sql)
347347
if (cwrap->userdata->dbsql_sent) {
348348
// if we do not run dbsqlok, FreeTDS will throw an error
349349
// Attempt to initiate a new Adaptive Server operation with results pending
350-
// note that both of these operations are blocking as we do not have access to these
351-
// "NOGVL" methods from result.c
352350
if (cwrap->userdata->dbsqlok_sent == 0) {
353-
dbsqlok(cwrap->client);
351+
if(nogvl_dbsqlok(cwrap->client) != SUCCEED) {
352+
rb_raise(cTinyTdsError, "unable to acknowledge previous results with server");
353+
}
354354
}
355355

356356
dbcancel(cwrap->client);

0 commit comments

Comments
 (0)