We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81abe84 commit 6de0b85Copy full SHA for 6de0b85
ext/tiny_tds/result.c
@@ -100,6 +100,17 @@ static void nogvl_cleanup(DBPROCESS *client) {
100
*/
101
for (short int i = 0; i < userdata->nonblocking_errors_length; i++) {
102
tinytds_errordata error = userdata->nonblocking_errors[i];
103
+
104
+ // lookahead to drain any info messages ahead of raising error
105
+ if (!error.is_message) {
106
+ for (short int j = i; j < userdata->nonblocking_errors_length; j++) {
107
+ tinytds_errordata msg_error = userdata->nonblocking_errors[j];
108
+ if (msg_error.is_message) {
109
+ rb_tinytds_raise_error(client, msg_error);
110
+ }
111
112
113
114
rb_tinytds_raise_error(client, error);
115
}
116
0 commit comments