tiny_tds 1.0.4 → 2.1.5
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 +5 -5
- data/.codeclimate.yml +20 -0
- data/.gitattributes +1 -0
- data/.rubocop.yml +31 -0
- data/.travis.yml +25 -0
- data/{CHANGELOG → CHANGELOG.md} +102 -26
- data/Gemfile +4 -1
- data/ISSUE_TEMPLATE.md +35 -2
- data/README.md +131 -56
- data/Rakefile +31 -88
- data/VERSION +1 -1
- data/appveyor.yml +38 -17
- data/docker-compose.yml +22 -0
- data/ext/tiny_tds/client.c +147 -60
- data/ext/tiny_tds/client.h +11 -5
- data/ext/tiny_tds/extconf.rb +41 -297
- data/ext/tiny_tds/extconsts.rb +7 -7
- data/ext/tiny_tds/result.c +40 -15
- data/lib/tiny_tds/bin.rb +45 -27
- data/lib/tiny_tds/client.rb +46 -34
- data/lib/tiny_tds/error.rb +0 -1
- data/lib/tiny_tds/gem.rb +32 -0
- data/lib/tiny_tds/result.rb +2 -3
- data/lib/tiny_tds/version.rb +1 -1
- data/lib/tiny_tds.rb +38 -14
- data/{ports/patches/freetds/1.00 → patches/freetds/1.00.27}/0001-mingw_missing_inet_pton.diff +4 -4
- data/patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff +28 -0
- data/patches/libiconv/1.14/1-avoid-gets-error.patch +17 -0
- data/tasks/native_gem.rake +14 -0
- data/tasks/package.rake +8 -0
- data/tasks/ports/freetds.rb +37 -0
- data/tasks/ports/libiconv.rb +43 -0
- data/tasks/ports/openssl.rb +62 -0
- data/tasks/ports/recipe.rb +52 -0
- data/tasks/ports.rake +85 -0
- data/tasks/test.rake +9 -0
- data/test/appveyor/dbsetup.ps1 +1 -1
- data/test/bin/install-freetds.sh +20 -0
- data/test/bin/install-openssl.sh +18 -0
- data/test/bin/setup.sh +19 -0
- data/test/client_test.rb +124 -66
- data/test/gem_test.rb +179 -0
- data/test/result_test.rb +128 -42
- data/test/schema/sqlserver_2016.sql +140 -0
- data/test/schema_test.rb +23 -23
- data/test/test_helper.rb +65 -7
- data/test/thread_test.rb +1 -1
- data/tiny_tds.gemspec +9 -7
- metadata +60 -20
- /data/bin/{defncopy → defncopy-ttds} +0 -0
- /data/bin/{tsql → tsql-ttds} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 68f96f7fe4be98e8165b7a9716e116dc3989a42511e0d9a5115bcf8e69fe6582
|
4
|
+
data.tar.gz: 96cbb636206ff15c987dba8759abe644e62168ed9afa5286acf57b18b95bf6ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8679ca4bc997fab7528f8ec2bce4f754b92319835157d08c017a20cf6561bae6638da077300cdd361302935b384a1b5ec00c05e014e7c12700e31bc5fd160d06
|
7
|
+
data.tar.gz: d35162380fec76c36ddff7f2407a1715105aa264be7c18ee2b078acfab6aab9a22a24854e815c9da389c295a4d6348668900752623f49fa222d31fd6e5b647a7
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
engines:
|
2
|
+
bundler-audit:
|
3
|
+
enabled: true
|
4
|
+
duplication:
|
5
|
+
enabled: true
|
6
|
+
config:
|
7
|
+
languages:
|
8
|
+
- ruby
|
9
|
+
fixme:
|
10
|
+
enabled: true
|
11
|
+
rubocop:
|
12
|
+
enabled: true
|
13
|
+
ratings:
|
14
|
+
paths:
|
15
|
+
- "**.rb"
|
16
|
+
exclude_paths:
|
17
|
+
- ext/
|
18
|
+
- ports/
|
19
|
+
- test/
|
20
|
+
- tmp/
|
data/.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.diff eol=lf
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
AllCops:
|
3
|
+
Include:
|
4
|
+
- '**/Rakefile'
|
5
|
+
Exclude:
|
6
|
+
- 'ext/**/*'
|
7
|
+
- 'ports/**/*'
|
8
|
+
- 'test/**/*'
|
9
|
+
- 'tmp/**/*'
|
10
|
+
|
11
|
+
# Redefined
|
12
|
+
|
13
|
+
Metrics/LineLength:
|
14
|
+
Max: 120
|
15
|
+
|
16
|
+
Metrics/ClassLength:
|
17
|
+
Max: 200
|
18
|
+
|
19
|
+
# Disabled
|
20
|
+
|
21
|
+
Style/Documentation:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/EmptyLinesAroundClassBody:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Style/EmptyLinesAroundModuleBody:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Style/EmptyLinesAroundBlockBody:
|
31
|
+
Enabled: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
sudo: required
|
2
|
+
cache: bundler
|
3
|
+
services:
|
4
|
+
- docker
|
5
|
+
env:
|
6
|
+
global:
|
7
|
+
- PATH=/opt/local/bin:$PATH
|
8
|
+
- TESTOPTS="-v"
|
9
|
+
- TINYTDS_UNIT_HOST=localhost
|
10
|
+
rvm:
|
11
|
+
- 2.4.5
|
12
|
+
- 2.5.3
|
13
|
+
- 2.6.1
|
14
|
+
- 2.7.0
|
15
|
+
before_install:
|
16
|
+
- docker info
|
17
|
+
- docker-compose up -d
|
18
|
+
- sudo ./test/bin/install-openssl.sh
|
19
|
+
- sudo ./test/bin/install-freetds.sh
|
20
|
+
install:
|
21
|
+
- gem install bundler
|
22
|
+
- bundle --version
|
23
|
+
- bundle install
|
24
|
+
script:
|
25
|
+
- bundle exec rake
|
data/{CHANGELOG → CHANGELOG.md}
RENAMED
@@ -1,26 +1,101 @@
|
|
1
|
-
|
1
|
+
## (unreleased)
|
2
|
+
|
3
|
+
## 2.1.5
|
4
|
+
|
5
|
+
* Fix compilation errors for Amazon Linux 1. Fixes #495.
|
6
|
+
* Fix segfault for login timeouts
|
7
|
+
|
8
|
+
## 2.1.4
|
9
|
+
|
10
|
+
* Improve handling of network related timeouts
|
11
|
+
* Fix error reporting when preceded by info message
|
12
|
+
|
13
|
+
## 2.1.3
|
14
|
+
|
15
|
+
* Removed old/unused appveyor config
|
16
|
+
* Remove old Rubies from CI & cross compile list
|
17
|
+
* Add Ruby 2.6 and 2.7 to the cross compile list
|
18
|
+
|
19
|
+
## 2.1.2
|
20
|
+
|
21
|
+
* Use Kernel.BigDecimal vs BigDecimal.new. Fixes #409.
|
22
|
+
* Change `DBSETUTF16` abscence warning message. Fixes #410.
|
23
|
+
* Add Windows binary for Ruby-2.5. Fixes #408.
|
24
|
+
|
25
|
+
## 2.1.1
|
26
|
+
|
27
|
+
* Move message_handler from a shared value to userdata.
|
28
|
+
|
29
|
+
|
30
|
+
## 2.1.0
|
31
|
+
|
32
|
+
* Support RubyInstaller2 for Windows. Fixes #365.
|
33
|
+
* Support the FREETDS_DIR environment variable. Fixes #371.
|
34
|
+
* Rename binstubs to tsql-ttds and defncopy-ttds
|
35
|
+
* Support separate timeout values per connection Fixes #348.
|
36
|
+
* Allow client proc to capture INFO messages. Fixes #352.
|
37
|
+
* Use official HTTP mirrors instead of FTP. Fixes #384.
|
38
|
+
|
39
|
+
|
40
|
+
## 2.0.0
|
41
|
+
|
42
|
+
* Stop building FreeTDS as a part of the extension build.
|
43
|
+
|
44
|
+
|
45
|
+
## 1.3.0
|
46
|
+
|
47
|
+
* FreeTDS: Link libgcc statically for Windows. (#351) Fixes #349.
|
48
|
+
|
49
|
+
|
50
|
+
## 1.2.0
|
51
|
+
|
52
|
+
* Use OpenSSL v1.1.0e & FreeTDS v1.00.27 for Windows builds.
|
53
|
+
|
54
|
+
|
55
|
+
## 1.1.0
|
56
|
+
|
57
|
+
* Use rake-compiler-dock v0.6.0
|
58
|
+
* Handle SYBVARIANT types from SQL function. Fixes #317. Fixed #321.
|
59
|
+
* Fix `use_utf16` optoin for booleans. Fixes #314
|
60
|
+
* Add `-q` check for bin puts. Fixes #318
|
61
|
+
* Use FreeTDS 1.00.21.
|
62
|
+
* Appveyor tests only 2012, 2014 with one Ruby, 23-x64.
|
63
|
+
* CircleCI & TravisCI both test 2016.
|
64
|
+
|
65
|
+
|
66
|
+
## 1.0.5
|
67
|
+
|
68
|
+
* Windows Static Builds - Use FreeTDS 1.00.15, OpenSSL 1.0.2j.
|
69
|
+
* Appveyor tests 2012, 2014, 2016.
|
70
|
+
* Error messages greater than 1024 chars generates a buffer overflow. Fixes #293.
|
71
|
+
* Ensures numeric options are treated numerically Fixes #303.
|
72
|
+
* New `:contained` login option. May deprecate `:azure`. Fixes #292.
|
73
|
+
* New `:use_utf16` login option. Toggle UCS-2 or UTF-16. Default true.
|
74
|
+
|
75
|
+
|
76
|
+
## 1.0.4
|
2
77
|
|
3
78
|
* Use FreeTDS 1.0 final
|
4
79
|
|
5
80
|
|
6
|
-
|
81
|
+
## 1.0.3
|
7
82
|
|
8
83
|
* Use FreeTDS 1.0rc5 for cross compile windows gems.
|
9
84
|
* Ensure we only work with latest FreeTDS v0.95.x or higher.
|
10
85
|
|
11
86
|
|
12
|
-
|
87
|
+
## 1.0.2
|
13
88
|
|
14
89
|
* Cross compile w/2.3.0 using rake-compiler-dock ~> 0.5.1. Fixes #268 #270.
|
15
90
|
* Use FreeTDS 1.0rc4 for cross compile windows gems.
|
16
91
|
|
17
92
|
|
18
|
-
|
93
|
+
## 1.0.1
|
19
94
|
|
20
95
|
* Fix ruby exe's in non-platform gem.
|
21
96
|
|
22
97
|
|
23
|
-
|
98
|
+
## 1.0.0
|
24
99
|
|
25
100
|
* Tested with FreeTDS 1.0.
|
26
101
|
* Add emoji support by default using FreeTDS v1.0 in docs.
|
@@ -44,7 +119,7 @@
|
|
44
119
|
* FreeTDS - Remove support for bad iconv.
|
45
120
|
|
46
121
|
|
47
|
-
|
122
|
+
## 0.7.0
|
48
123
|
|
49
124
|
* Refactor build of FreeTDS & Iconv recipes. Add OpenSSL. Merged #207.
|
50
125
|
* Ensure zero terminated strings, where C-str pointers are expected. Use StringValueCStr() Fixes #208.
|
@@ -56,7 +131,7 @@
|
|
56
131
|
* Remove Ruby 1.8.6 support. We always use Time vs edge case DateTime.
|
57
132
|
|
58
133
|
|
59
|
-
|
134
|
+
## 0.6.2
|
60
135
|
|
61
136
|
* Support an optional environment variable to find FreeTDS. Fixes #128.
|
62
137
|
* Allow Support for 31+ Character Usernames/Passwords. Fixes #134. Thanks @wbond.
|
@@ -66,12 +141,12 @@
|
|
66
141
|
as backups and restores. Fixes #150.
|
67
142
|
|
68
143
|
|
69
|
-
|
144
|
+
## 0.6.1
|
70
145
|
|
71
146
|
Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
72
147
|
|
73
148
|
|
74
|
-
|
149
|
+
## 0.6.0
|
75
150
|
|
76
151
|
* Use dbsetversion() vs. dbsetlversion. Fixes #62.
|
77
152
|
* Remove Ruby 1.8 support.
|
@@ -88,12 +163,12 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
88
163
|
* Raise and handle encoding errors on DB writes. Fixes #89.
|
89
164
|
|
90
165
|
|
91
|
-
|
166
|
+
## 0.5.1
|
92
167
|
|
93
168
|
* Change how we configure with iconv, basically it is always needed. Fixes #11 & #69.
|
94
169
|
|
95
170
|
|
96
|
-
|
171
|
+
## 0.5.0
|
97
172
|
|
98
173
|
* Copy mysql2s handling of Time and Datetime so 64bit systems are leveraged. Fixes #46 and #47. Thanks @lsylvester!
|
99
174
|
* Add CFLAGS='-fPIC' for libtool. Fix TDS version configs in our ports file. Document. Fixes #45
|
@@ -107,7 +182,7 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
107
182
|
* Do not raise a TinyTds::Error with our message handler unless the severity is greater than 10.
|
108
183
|
|
109
184
|
|
110
|
-
|
185
|
+
## 0.4.5
|
111
186
|
|
112
187
|
* Includes precompiled Windows binaries for FreeTDS 0.91rc2 & LibIconv. No precompiled OpenSSL yet for Windows to SQL Azure.
|
113
188
|
* Fixed symbolized unicode column names.
|
@@ -116,19 +191,19 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
116
191
|
* Change how :host/:port are implemented. Now sending "host:port" to :dataserver.
|
117
192
|
|
118
193
|
|
119
|
-
|
194
|
+
## 0.4.4
|
120
195
|
|
121
196
|
* New :host/:port connection options. Removes need for freetds.conf file.
|
122
197
|
|
123
198
|
|
124
|
-
|
199
|
+
## 0.4.3
|
125
200
|
|
126
201
|
* New Client#active? method to check for good connection. Always use this abstract method.
|
127
202
|
* Better SYBEWRIT "Write to SQL Server failed." error handling. New Client#dead? check.
|
128
203
|
* Azure tested using latest FreeTDS with submitted patch. https://gist.github.com/889190
|
129
204
|
|
130
205
|
|
131
|
-
|
206
|
+
## 0.4.2
|
132
207
|
|
133
208
|
* Iconv is a dep only when compiling locally. However, left in the ability to configure
|
134
209
|
it for native gem installation but you must use
|
@@ -136,12 +211,12 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
136
211
|
* Really fix what 0.4.1 was supposed to do, force SYBDBLIB compile.
|
137
212
|
|
138
213
|
|
139
|
-
|
214
|
+
## 0.4.1
|
140
215
|
|
141
216
|
* Undefine MSDBLIB in case others have explicitly compiled FreeTDS with "MS db-lib source compatibility: yes".
|
142
217
|
|
143
218
|
|
144
|
-
|
219
|
+
## 0.4.0
|
145
220
|
|
146
221
|
* Allow SYBEICONVI errors to pass thru so that bad data is converted to ? marks.
|
147
222
|
* Build native deps using MiniPortile [Luis Lavena]
|
@@ -150,42 +225,44 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
150
225
|
state of the client and the need to use Result#cancel to stop processing active results. It is also
|
151
226
|
safe to call Result#cancel over and over again.
|
152
227
|
* Look for the syb headers only.
|
228
|
+
* Fix minitest global matchers warnings.
|
229
|
+
* Fix test warnings.
|
153
230
|
|
154
231
|
|
155
|
-
|
232
|
+
## 0.3.2
|
156
233
|
|
157
234
|
* Small changes while testing JRuby. Using options hash for connect vs many args.
|
158
235
|
|
159
236
|
|
160
|
-
|
237
|
+
## 0.3.1
|
161
238
|
|
162
239
|
* Fix bad gem build.
|
163
240
|
|
164
241
|
|
165
|
-
|
242
|
+
## 0.3.0
|
166
243
|
|
167
244
|
* Access stored procedure return codes.
|
168
245
|
* Make sure dead or not enabled connections are handled.
|
169
246
|
* Fix bad client after timeout & read from server errors.
|
170
247
|
|
171
248
|
|
172
|
-
|
249
|
+
## 0.2.3
|
173
250
|
|
174
251
|
* Do not use development ruby/version, but simple memoize an eval check on init to find out, for 1.8.6 reflection.
|
175
252
|
|
176
253
|
|
177
|
-
|
254
|
+
## 0.2.2
|
178
255
|
|
179
256
|
* Fixed failing test in Ruby 1.8.6. DateTime doesn't support fractional seconds greater than 59.
|
180
257
|
See: http://redmine.ruby-lang.org/issues/show/1490 [Erik Bryn]
|
181
258
|
|
182
259
|
|
183
|
-
|
260
|
+
## 0.2.1
|
184
261
|
|
185
262
|
* Compatibility with 32-bit systems. Better cross language testing. [Klaus Gundermann]
|
186
263
|
|
187
264
|
|
188
|
-
|
265
|
+
## 0.2.0
|
189
266
|
|
190
267
|
* Convert GUID's in a more compatible way. [Klaus Gundermann]
|
191
268
|
* Handle multiple result sets in command buffer or stored procs. [Ken Collins]
|
@@ -194,5 +271,4 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
194
271
|
* Properly encode column names in 1.9. [Erik Bryn]
|
195
272
|
|
196
273
|
|
197
|
-
|
198
|
-
|
274
|
+
## 0.1.0 Initial release!
|
data/Gemfile
CHANGED
data/ISSUE_TEMPLATE.md
CHANGED
@@ -1,5 +1,38 @@
|
|
1
|
-
|
1
|
+
## Before submitting an issue please check these first!
|
2
2
|
|
3
|
+
* On Windows? If so, do you need devkit for your ruby install?
|
4
|
+
* Using Ubuntu? If so, you may have forgotten to install FreeTDS first.
|
3
5
|
* Are you using FreeTDS 0.95.80 or later? Check `$ tsql -C` to find out.
|
4
6
|
* If not, please update then uninstall the TinyTDS gem and re-install it.
|
5
|
-
*
|
7
|
+
* Have you made sure to [enable SQL Server authentication](http://bit.ly/1Kw3set)?
|
8
|
+
* Doing work with threads and the raw client? Use the ConnectionPool gem?
|
9
|
+
|
10
|
+
If none of these help. Please fill out the following:
|
11
|
+
|
12
|
+
## Environment
|
13
|
+
|
14
|
+
**Operating System**
|
15
|
+
|
16
|
+
Please describe your operating system and version here.
|
17
|
+
If unsure please try the following from the command line:
|
18
|
+
|
19
|
+
* For Windows: `systeminfo | findstr /C:OS`
|
20
|
+
* For Linux: `lsb_release -a; uname -a`
|
21
|
+
* For Mac OSX: `sw_vers`
|
22
|
+
|
23
|
+
**TinyTDS Version and Information**
|
24
|
+
|
25
|
+
```
|
26
|
+
Please paste the full output of `ttds-tsql -C` (or `tsql -C` for older versions
|
27
|
+
of TinyTDS) here. If TinyTDS does not install, please provide the gem version.
|
28
|
+
```
|
29
|
+
|
30
|
+
|
31
|
+
**FreeTDS Version**
|
32
|
+
|
33
|
+
Please provide your system's FreeTDS version. If you are using the pre-compiled
|
34
|
+
windows gem you may omit this section.
|
35
|
+
|
36
|
+
## Description
|
37
|
+
|
38
|
+
Please describe the bug or feature request here.
|