tiny_tds 2.1.4-x64-mingw32 → 2.1.5-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/VERSION +1 -1
- data/ext/tiny_tds/client.c +4 -3
- data/ext/tiny_tds/result.c +4 -2
- data/test/client_test.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f523a732b6d4b9e39320e3331465de0f566cddec1049460c9b2bbb1d5fc8c8
|
4
|
+
data.tar.gz: f411a519c17e3a4ff53c187f84018ef3d0ebe516aaae2778ce18ef8fc6c21016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46a60fddcfff07dbe8b7fe4c0a1aaf1520b9bcbeff5759dbcdade07b22b15cdf118fd8cf515f4750729c3e785a5d9a9fa7a463971a0b8229bfc030e1cea02650
|
7
|
+
data.tar.gz: 27cffc6e51817b4d8d828079f7495ad8c4b683fe272246aab792a48547866e7e183d9d3f1d14c85a3bfadf9ebea4fb8be8542e94c8518836ce3054a1a73b34d9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## (unreleased)
|
2
2
|
|
3
|
+
## 2.1.5
|
4
|
+
|
5
|
+
* Fix compilation errors for Amazon Linux 1. Fixes #495.
|
6
|
+
* Fix segfault for login timeouts
|
7
|
+
|
3
8
|
## 2.1.4
|
4
9
|
|
5
10
|
* Improve handling of network related timeouts
|
@@ -267,4 +272,3 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
267
272
|
|
268
273
|
|
269
274
|
## 0.1.0 Initial release!
|
270
|
-
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.5
|
data/ext/tiny_tds/client.c
CHANGED
@@ -96,13 +96,14 @@ int tinytds_err_handler(DBPROCESS *dbproc, int severity, int dberr, int oserr, c
|
|
96
96
|
but we don't ever want to automatically retry. Instead have the app
|
97
97
|
decide what to do.
|
98
98
|
*/
|
99
|
-
if (userdata->timing_out) {
|
99
|
+
if (userdata && userdata->timing_out) {
|
100
100
|
return INT_CANCEL;
|
101
101
|
}
|
102
|
-
|
102
|
+
// userdata will not be set if hitting timeout during login so check for it first
|
103
|
+
if (userdata) {
|
103
104
|
userdata->timing_out = 1;
|
104
|
-
return_value = INT_TIMEOUT;
|
105
105
|
}
|
106
|
+
return_value = INT_TIMEOUT;
|
106
107
|
cancel = 1;
|
107
108
|
break;
|
108
109
|
|
data/ext/tiny_tds/result.c
CHANGED
@@ -99,12 +99,14 @@ static void nogvl_cleanup(DBPROCESS *client) {
|
|
99
99
|
Now that the blocking operation is done, we can finally throw any
|
100
100
|
exceptions based on errors from SQL Server.
|
101
101
|
*/
|
102
|
-
|
102
|
+
short int i;
|
103
|
+
for (i = 0; i < userdata->nonblocking_errors_length; i++) {
|
103
104
|
tinytds_errordata error = userdata->nonblocking_errors[i];
|
104
105
|
|
105
106
|
// lookahead to drain any info messages ahead of raising error
|
106
107
|
if (!error.is_message) {
|
107
|
-
|
108
|
+
short int j;
|
109
|
+
for (j = i; j < userdata->nonblocking_errors_length; j++) {
|
108
110
|
tinytds_errordata msg_error = userdata->nonblocking_errors[j];
|
109
111
|
if (msg_error.is_message) {
|
110
112
|
rb_tinytds_raise_error(client, msg_error);
|
data/test/client_test.rb
CHANGED
@@ -176,6 +176,24 @@ class ClientTest < TinyTds::TestCase
|
|
176
176
|
end
|
177
177
|
end
|
178
178
|
|
179
|
+
it 'raises TinyTds exception with login timeout' do
|
180
|
+
skip if ENV['CI'] && ENV['APPVEYOR_BUILD_FOLDER'] # only CI using docker
|
181
|
+
begin
|
182
|
+
action = lambda do
|
183
|
+
Toxiproxy[:sqlserver_test].toxic(:timeout, timeout: 0).apply do
|
184
|
+
new_connection login_timeout: 1, port: 1234
|
185
|
+
end
|
186
|
+
end
|
187
|
+
assert_raise_tinytds_error(action) do |e|
|
188
|
+
assert_equal 20003, e.db_error_number
|
189
|
+
assert_equal 6, e.severity
|
190
|
+
assert_match %r{timed out}i, e.message, 'ignore if non-english test run'
|
191
|
+
end
|
192
|
+
ensure
|
193
|
+
assert_new_connections_work
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
179
197
|
it 'raises TinyTds exception with wrong :username' do
|
180
198
|
skip if ENV['CI'] && sqlserver_azure? # Some issue with db_error_number.
|
181
199
|
options = connection_options :username => 'willnotwork'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_tds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-05-
|
13
|
+
date: 2021-05-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mini_portile2
|