tiny_tds 2.1.5 → 3.2.0
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/.github/workflows/ci.yml +590 -0
- data/.gitignore +2 -0
- data/CHANGELOG.md +32 -1
- data/Gemfile +1 -8
- data/ISSUE_TEMPLATE.md +1 -1
- data/README.md +75 -88
- data/Rakefile +44 -30
- data/VERSION +1 -1
- data/docker-compose.yml +20 -8
- data/ext/tiny_tds/client.c +10 -15
- data/ext/tiny_tds/extconf.rb +183 -66
- data/ext/tiny_tds/extconsts.rb +4 -11
- data/ext/tiny_tds/result.c +28 -35
- data/ext/tiny_tds/tiny_tds_ext.c +4 -1
- data/lib/tiny_tds/bin.rb +12 -26
- data/lib/tiny_tds/client.rb +38 -42
- data/lib/tiny_tds/error.rb +0 -2
- data/lib/tiny_tds/gem.rb +5 -14
- data/lib/tiny_tds/result.rb +0 -2
- data/lib/tiny_tds/version.rb +1 -1
- data/lib/tiny_tds.rb +28 -47
- data/setup_cimgruby_dev.sh +25 -0
- data/start_dev.sh +21 -0
- data/tasks/native_gem.rake +12 -10
- data/tasks/package.rake +1 -3
- data/tasks/ports.rake +14 -75
- data/tasks/test.rake +3 -5
- data/test/bin/install-freetds.sh +2 -4
- data/test/bin/install-mssql.ps1 +42 -0
- data/test/bin/install-mssqltools.sh +9 -0
- data/test/bin/restore-from-native-gem.ps1 +10 -0
- data/test/bin/setup_tinytds_db.sh +7 -0
- data/test/bin/setup_volume_permissions.sh +10 -0
- data/test/client_test.rb +111 -120
- data/test/gem_test.rb +32 -111
- data/test/result_test.rb +259 -365
- data/test/schema_test.rb +369 -395
- data/test/sql/db-create.sql +18 -0
- data/test/sql/db-login.sql +38 -0
- data/test/test_helper.rb +75 -102
- data/test/thread_test.rb +22 -31
- data/tiny_tds.gemspec +28 -27
- metadata +70 -57
- data/.travis.yml +0 -25
- data/appveyor.yml +0 -72
- data/tasks/ports/freetds.rb +0 -37
- data/tasks/ports/libiconv.rb +0 -43
- data/tasks/ports/openssl.rb +0 -62
- data/tasks/ports/recipe.rb +0 -52
- data/test/appveyor/dbsetup.ps1 +0 -27
- data/test/appveyor/dbsetup.sql +0 -9
- data/test/benchmark/query.rb +0 -77
- data/test/benchmark/query_odbc.rb +0 -106
- data/test/benchmark/query_tinytds.rb +0 -126
- data/test/bin/setup.sh +0 -19
- data/test/schema/sqlserver_2000.sql +0 -140
- data/test/schema/sqlserver_2005.sql +0 -140
- data/test/schema/sqlserver_2014.sql +0 -140
- data/test/schema/sqlserver_2016.sql +0 -140
- data/test/schema/sybase_ase.sql +0 -138
- /data/test/schema/{sqlserver_2008.sql → sqlserver_2017.sql} +0 -0
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.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -10,92 +10,120 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2025-02-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: bigdecimal
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - "~>"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '3'
|
15
29
|
- !ruby/object:Gem::Dependency
|
16
30
|
name: mini_portile2
|
17
31
|
requirement: !ruby/object:Gem::Requirement
|
18
32
|
requirements:
|
19
33
|
- - "~>"
|
20
34
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
35
|
+
version: 2.8.0
|
22
36
|
type: :development
|
23
37
|
prerelease: false
|
24
38
|
version_requirements: !ruby/object:Gem::Requirement
|
25
39
|
requirements:
|
26
40
|
- - "~>"
|
27
41
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
42
|
+
version: 2.8.0
|
29
43
|
- !ruby/object:Gem::Dependency
|
30
44
|
name: rake
|
31
45
|
requirement: !ruby/object:Gem::Requirement
|
32
46
|
requirements:
|
33
47
|
- - "~>"
|
34
48
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
49
|
+
version: 13.0.0
|
36
50
|
type: :development
|
37
51
|
prerelease: false
|
38
52
|
version_requirements: !ruby/object:Gem::Requirement
|
39
53
|
requirements:
|
40
54
|
- - "~>"
|
41
55
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
56
|
+
version: 13.0.0
|
43
57
|
- !ruby/object:Gem::Dependency
|
44
58
|
name: rake-compiler
|
45
59
|
requirement: !ruby/object:Gem::Requirement
|
46
60
|
requirements:
|
47
61
|
- - "~>"
|
48
62
|
- !ruby/object:Gem::Version
|
49
|
-
version: '1.
|
63
|
+
version: '1.2'
|
50
64
|
type: :development
|
51
65
|
prerelease: false
|
52
66
|
version_requirements: !ruby/object:Gem::Requirement
|
53
67
|
requirements:
|
54
68
|
- - "~>"
|
55
69
|
- !ruby/object:Gem::Version
|
56
|
-
version: '1.
|
70
|
+
version: '1.2'
|
57
71
|
- !ruby/object:Gem::Dependency
|
58
72
|
name: rake-compiler-dock
|
59
73
|
requirement: !ruby/object:Gem::Requirement
|
60
74
|
requirements:
|
61
75
|
- - "~>"
|
62
76
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
77
|
+
version: 1.9.1
|
64
78
|
type: :development
|
65
79
|
prerelease: false
|
66
80
|
version_requirements: !ruby/object:Gem::Requirement
|
67
81
|
requirements:
|
68
82
|
- - "~>"
|
69
83
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
84
|
+
version: 1.9.1
|
71
85
|
- !ruby/object:Gem::Dependency
|
72
86
|
name: minitest
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
74
88
|
requirements:
|
75
89
|
- - "~>"
|
76
90
|
- !ruby/object:Gem::Version
|
77
|
-
version: '5.
|
91
|
+
version: '5.25'
|
92
|
+
type: :development
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '5.25'
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
name: minitest-reporters
|
101
|
+
requirement: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 1.6.1
|
78
106
|
type: :development
|
79
107
|
prerelease: false
|
80
108
|
version_requirements: !ruby/object:Gem::Requirement
|
81
109
|
requirements:
|
82
110
|
- - "~>"
|
83
111
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
112
|
+
version: 1.6.1
|
85
113
|
- !ruby/object:Gem::Dependency
|
86
114
|
name: connection_pool
|
87
115
|
requirement: !ruby/object:Gem::Requirement
|
88
116
|
requirements:
|
89
117
|
- - "~>"
|
90
118
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
119
|
+
version: 2.2.0
|
92
120
|
type: :development
|
93
121
|
prerelease: false
|
94
122
|
version_requirements: !ruby/object:Gem::Requirement
|
95
123
|
requirements:
|
96
124
|
- - "~>"
|
97
125
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
126
|
+
version: 2.2.0
|
99
127
|
- !ruby/object:Gem::Dependency
|
100
128
|
name: toxiproxy
|
101
129
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,6 +138,20 @@ dependencies:
|
|
110
138
|
- - "~>"
|
111
139
|
- !ruby/object:Gem::Version
|
112
140
|
version: 2.0.0
|
141
|
+
- !ruby/object:Gem::Dependency
|
142
|
+
name: standard
|
143
|
+
requirement: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 1.31.0
|
148
|
+
type: :development
|
149
|
+
prerelease: false
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - "~>"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 1.31.0
|
113
155
|
description: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.
|
114
156
|
Developed for the ActiveRecord SQL Server adapter.
|
115
157
|
email:
|
@@ -124,9 +166,9 @@ extra_rdoc_files: []
|
|
124
166
|
files:
|
125
167
|
- ".codeclimate.yml"
|
126
168
|
- ".gitattributes"
|
169
|
+
- ".github/workflows/ci.yml"
|
127
170
|
- ".gitignore"
|
128
171
|
- ".rubocop.yml"
|
129
|
-
- ".travis.yml"
|
130
172
|
- CHANGELOG.md
|
131
173
|
- CODE_OF_CONDUCT.md
|
132
174
|
- Gemfile
|
@@ -135,7 +177,6 @@ files:
|
|
135
177
|
- README.md
|
136
178
|
- Rakefile
|
137
179
|
- VERSION
|
138
|
-
- appveyor.yml
|
139
180
|
- bin/defncopy-ttds
|
140
181
|
- bin/tsql-ttds
|
141
182
|
- docker-compose.yml
|
@@ -158,34 +199,28 @@ files:
|
|
158
199
|
- patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
|
159
200
|
- patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff
|
160
201
|
- patches/libiconv/1.14/1-avoid-gets-error.patch
|
202
|
+
- setup_cimgruby_dev.sh
|
203
|
+
- start_dev.sh
|
161
204
|
- tasks/native_gem.rake
|
162
205
|
- tasks/package.rake
|
163
206
|
- tasks/ports.rake
|
164
|
-
- tasks/ports/freetds.rb
|
165
|
-
- tasks/ports/libiconv.rb
|
166
|
-
- tasks/ports/openssl.rb
|
167
|
-
- tasks/ports/recipe.rb
|
168
207
|
- tasks/test.rake
|
169
|
-
- test/appveyor/dbsetup.ps1
|
170
|
-
- test/appveyor/dbsetup.sql
|
171
|
-
- test/benchmark/query.rb
|
172
|
-
- test/benchmark/query_odbc.rb
|
173
|
-
- test/benchmark/query_tinytds.rb
|
174
208
|
- test/bin/install-freetds.sh
|
209
|
+
- test/bin/install-mssql.ps1
|
210
|
+
- test/bin/install-mssqltools.sh
|
175
211
|
- test/bin/install-openssl.sh
|
176
|
-
- test/bin/
|
212
|
+
- test/bin/restore-from-native-gem.ps1
|
213
|
+
- test/bin/setup_tinytds_db.sh
|
214
|
+
- test/bin/setup_volume_permissions.sh
|
177
215
|
- test/client_test.rb
|
178
216
|
- test/gem_test.rb
|
179
217
|
- test/result_test.rb
|
180
218
|
- test/schema/1px.gif
|
181
|
-
- test/schema/
|
182
|
-
- test/schema/sqlserver_2005.sql
|
183
|
-
- test/schema/sqlserver_2008.sql
|
184
|
-
- test/schema/sqlserver_2014.sql
|
185
|
-
- test/schema/sqlserver_2016.sql
|
219
|
+
- test/schema/sqlserver_2017.sql
|
186
220
|
- test/schema/sqlserver_azure.sql
|
187
|
-
- test/schema/sybase_ase.sql
|
188
221
|
- test/schema_test.rb
|
222
|
+
- test/sql/db-create.sql
|
223
|
+
- test/sql/db-login.sql
|
189
224
|
- test/test_helper.rb
|
190
225
|
- test/thread_test.rb
|
191
226
|
- tiny_tds.gemspec
|
@@ -203,37 +238,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
238
|
requirements:
|
204
239
|
- - ">="
|
205
240
|
- !ruby/object:Gem::Version
|
206
|
-
version: 2.
|
241
|
+
version: 2.7.0
|
207
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
243
|
requirements:
|
209
244
|
- - ">="
|
210
245
|
- !ruby/object:Gem::Version
|
211
246
|
version: '0'
|
212
247
|
requirements: []
|
213
|
-
rubygems_version: 3.
|
248
|
+
rubygems_version: 3.1.6
|
214
249
|
signing_key:
|
215
250
|
specification_version: 4
|
216
251
|
summary: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.
|
217
|
-
test_files:
|
218
|
-
- test/appveyor/dbsetup.ps1
|
219
|
-
- test/appveyor/dbsetup.sql
|
220
|
-
- test/benchmark/query.rb
|
221
|
-
- test/benchmark/query_odbc.rb
|
222
|
-
- test/benchmark/query_tinytds.rb
|
223
|
-
- test/bin/install-freetds.sh
|
224
|
-
- test/bin/install-openssl.sh
|
225
|
-
- test/bin/setup.sh
|
226
|
-
- test/client_test.rb
|
227
|
-
- test/gem_test.rb
|
228
|
-
- test/result_test.rb
|
229
|
-
- test/schema/1px.gif
|
230
|
-
- test/schema/sqlserver_2000.sql
|
231
|
-
- test/schema/sqlserver_2005.sql
|
232
|
-
- test/schema/sqlserver_2008.sql
|
233
|
-
- test/schema/sqlserver_2014.sql
|
234
|
-
- test/schema/sqlserver_2016.sql
|
235
|
-
- test/schema/sqlserver_azure.sql
|
236
|
-
- test/schema/sybase_ase.sql
|
237
|
-
- test/schema_test.rb
|
238
|
-
- test/test_helper.rb
|
239
|
-
- test/thread_test.rb
|
252
|
+
test_files: []
|
data/.travis.yml
DELETED
@@ -1,25 +0,0 @@
|
|
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/appveyor.yml
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
init:
|
2
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
3
|
-
- SET RAKEOPT=-rdevkit
|
4
|
-
- SET TESTOPTS='-v'
|
5
|
-
- SET MAKE=make V=1 -j2
|
6
|
-
clone_depth: 5
|
7
|
-
skip_tags: true
|
8
|
-
skip_branch_with_pr: true
|
9
|
-
matrix:
|
10
|
-
fast_finish: false
|
11
|
-
install:
|
12
|
-
# Output debugging info
|
13
|
-
- ps: Update-AppveyorBuild -Version "$(Get-Content $env:appveyor_build_folder\VERSION).$env:appveyor_build_number"
|
14
|
-
- ps: |
|
15
|
-
if ($env:ruby_version -like "*head*") {
|
16
|
-
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-$env:ruby_version.exe", "$pwd/ruby-setup.exe")
|
17
|
-
cmd /c ruby-setup.exe /verysilent /dir=C:/Ruby$env:ruby_version
|
18
|
-
}
|
19
|
-
- perl --version
|
20
|
-
- ruby --version
|
21
|
-
- gem --version
|
22
|
-
# Update keyring according to https://www.msys2.org/news/#2020-06-29-new-packagers
|
23
|
-
- C:\msys64\usr\bin\curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
|
24
|
-
- C:\msys64\usr\bin\curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
|
25
|
-
- ridk exec bash -c "pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
|
26
|
-
- ridk exec bash -c "pacman -U --noconfirm --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
|
27
|
-
# Update zstd and pacman first https://github.com/msys2/MSYS2-packages/issues/2300
|
28
|
-
- C:\msys64\usr\bin\pacman --noconfirm --upgrade https://repo.msys2.org/msys/x86_64/zstd-1.4.7-1-x86_64.pkg.tar.xz # Must come First, or else pacman will install 1.4.8
|
29
|
-
- C:\msys64\usr\bin\pacman --noconfirm --upgrade https://repo.msys2.org/msys/x86_64/pacman-5.2.2-5-x86_64.pkg.tar.xz
|
30
|
-
# update packages
|
31
|
-
- C:\msys64\usr\bin\pacman --noconfirm --ask 20 --sync --refresh --refresh --sysupgrade --sysupgrade
|
32
|
-
# Kill all running msys2 binaries to avoid error "size of shared memory region changed".
|
33
|
-
# See https://github.com/msys2/MSYS2-packages/issues/258
|
34
|
-
- powershell -Command "Get-Process | Where-Object {$_.path -like 'C:\msys64*'} | Stop-Process"
|
35
|
-
# refresh the package list to avoid "error: failed to prepare transaction (could not find database)"
|
36
|
-
- ridk exec bash -c "pacman --noconfirm -Sy"
|
37
|
-
# prevent freetds to link to wrong ws2_32 lib on i686-w64-mingw32
|
38
|
-
- c:/msys64/usr/bin/rm /usr/lib/w32api/libws2_32.a
|
39
|
-
# Set up project prerequisits
|
40
|
-
- bundle install
|
41
|
-
- bundle exec rake ports
|
42
|
-
build: off
|
43
|
-
branches:
|
44
|
-
except:
|
45
|
-
- /dev.*/
|
46
|
-
test_script:
|
47
|
-
- timeout /t 4 /nobreak > NUL
|
48
|
-
- powershell -File "%APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.ps1"
|
49
|
-
- timeout /t 4 /nobreak > NUL
|
50
|
-
- ps: Start-Service 'MSSQL$SQL2014'
|
51
|
-
- timeout /t 4 /nobreak > NUL
|
52
|
-
- sqlcmd -S ".\SQL2014" -U sa -P Password12! -i %APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.sql
|
53
|
-
- bundle exec rake ports build test TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2014" TINYTDS_SCHEMA=sqlserver_2014 TDSVER=7.1
|
54
|
-
- bundle exec rake ports build test TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2014" TINYTDS_SCHEMA=sqlserver_2014
|
55
|
-
- ps: Stop-Service 'MSSQL$SQL2014'
|
56
|
-
- ps: Start-Service 'MSSQL$SQL2012SP1'
|
57
|
-
- timeout /t 4 /nobreak > NUL
|
58
|
-
- sqlcmd -S ".\SQL2012SP1" -U sa -P Password12! -i %APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.sql
|
59
|
-
- bundle exec rake ports build test TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2012SP1" TINYTDS_SCHEMA=sqlserver_2014
|
60
|
-
environment:
|
61
|
-
CI_AZURE_HOST:
|
62
|
-
secure: 8ydpYysZYKEBKvp6plKlYfepH98/zAuT27FFCaJ9Sss=
|
63
|
-
TINYTDS_UNIT_AZURE_PASS:
|
64
|
-
secure: fYKSKV4v+36OFQp2nZdX4DfUpgmy5cm0wuR73cgdmEk=
|
65
|
-
matrix:
|
66
|
-
- ruby_version: "24"
|
67
|
-
- ruby_version: "25-x64"
|
68
|
-
- ruby_version: "26"
|
69
|
-
- ruby_version: "head-x64"
|
70
|
-
on_failure:
|
71
|
-
- find -name config.log | xargs cat
|
72
|
-
- find -name compile.log | xargs cat
|
data/tasks/ports/freetds.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
require_relative './recipe'
|
2
|
-
|
3
|
-
module Ports
|
4
|
-
class Freetds < Recipe
|
5
|
-
def initialize(version)
|
6
|
-
super('freetds', version)
|
7
|
-
|
8
|
-
set_patches
|
9
|
-
end
|
10
|
-
|
11
|
-
private
|
12
|
-
|
13
|
-
def configure_defaults
|
14
|
-
opts = super
|
15
|
-
|
16
|
-
opts << '--with-pic'
|
17
|
-
opts << '--disable-odbc'
|
18
|
-
|
19
|
-
if version =~ /0\.91/
|
20
|
-
opts << '--with-tdsver=7.1'
|
21
|
-
else
|
22
|
-
opts << '--with-tdsver=7.3'
|
23
|
-
end
|
24
|
-
|
25
|
-
if windows?
|
26
|
-
opts << '--sysconfdir=C:/Sites'
|
27
|
-
opts << '--enable-sspi'
|
28
|
-
end
|
29
|
-
|
30
|
-
opts
|
31
|
-
end
|
32
|
-
|
33
|
-
def set_patches
|
34
|
-
self.patch_files.concat get_patches(name, version)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
data/tasks/ports/libiconv.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
require_relative './recipe'
|
2
|
-
|
3
|
-
module Ports
|
4
|
-
class Libiconv < Recipe
|
5
|
-
def initialize(version)
|
6
|
-
super('libiconv', version)
|
7
|
-
|
8
|
-
set_patches
|
9
|
-
end
|
10
|
-
|
11
|
-
def cook
|
12
|
-
chdir_for_build do
|
13
|
-
super
|
14
|
-
end
|
15
|
-
self
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
# When using rake-compiler-dock on Windows, the underlying Virtualbox shared
|
21
|
-
# folders don't support symlinks, but libiconv expects it for a build on
|
22
|
-
# Linux. We work around this limitation by using the temp dir for cooking.
|
23
|
-
def chdir_for_build
|
24
|
-
build_dir = ENV['RCD_HOST_RUBY_PLATFORM'].to_s =~ /mingw|mswin|cygwin/ ? '/tmp' : '.'
|
25
|
-
Dir.chdir(build_dir) do
|
26
|
-
yield
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def configure_defaults
|
31
|
-
[
|
32
|
-
"--host=#{@host}",
|
33
|
-
'--disable-static',
|
34
|
-
'--enable-shared',
|
35
|
-
'CFLAGS=-fPIC -O2'
|
36
|
-
]
|
37
|
-
end
|
38
|
-
|
39
|
-
def set_patches
|
40
|
-
self.patch_files.concat get_patches(name, version)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
data/tasks/ports/openssl.rb
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
require_relative './recipe'
|
2
|
-
|
3
|
-
module Ports
|
4
|
-
class Openssl < Recipe
|
5
|
-
def initialize(version)
|
6
|
-
super('openssl', version)
|
7
|
-
|
8
|
-
set_patches
|
9
|
-
end
|
10
|
-
|
11
|
-
def configure
|
12
|
-
return if configured?
|
13
|
-
|
14
|
-
md5_file = File.join(tmp_path, 'configure.md5')
|
15
|
-
digest = Digest::MD5.hexdigest(computed_options.to_s)
|
16
|
-
File.open(md5_file, "w") { |f| f.write digest }
|
17
|
-
|
18
|
-
# Windows doesn't recognize the shebang so always explicitly use sh
|
19
|
-
execute('configure', "sh -c \"./Configure #{computed_options.join(' ')}\"")
|
20
|
-
end
|
21
|
-
|
22
|
-
def install
|
23
|
-
unless installed?
|
24
|
-
execute('install', %Q(#{make_cmd} install_sw install_ssldirs))
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
|
-
def configure_defaults
|
31
|
-
opts = [
|
32
|
-
'shared',
|
33
|
-
target_arch,
|
34
|
-
"--openssldir=#{path}",
|
35
|
-
]
|
36
|
-
|
37
|
-
if cross_build?
|
38
|
-
opts << "--cross-compile-prefix=#{host}-"
|
39
|
-
end
|
40
|
-
|
41
|
-
opts
|
42
|
-
end
|
43
|
-
|
44
|
-
def target_arch
|
45
|
-
if windows?
|
46
|
-
arch = ''
|
47
|
-
arch = '64' if host=~ /x86_64/
|
48
|
-
|
49
|
-
"mingw#{arch}"
|
50
|
-
else
|
51
|
-
arch = 'x32'
|
52
|
-
arch = 'x86_64' if host=~ /x86_64/
|
53
|
-
|
54
|
-
"linux-#{arch}"
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def set_patches
|
59
|
-
self.patch_files.concat get_patches(name, version)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
data/tasks/ports/recipe.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
require 'mini_portile2'
|
3
|
-
require 'fileutils'
|
4
|
-
require 'rbconfig'
|
5
|
-
|
6
|
-
module Ports
|
7
|
-
class Recipe < MiniPortile
|
8
|
-
def cook
|
9
|
-
checkpoint = "ports/#{name}-#{version}-#{host}.installed"
|
10
|
-
|
11
|
-
unless File.exist? checkpoint
|
12
|
-
super
|
13
|
-
FileUtils.touch checkpoint
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def configure_defaults
|
20
|
-
[
|
21
|
-
"--host=#{@host}",
|
22
|
-
'--disable-static',
|
23
|
-
'--enable-shared'
|
24
|
-
]
|
25
|
-
end
|
26
|
-
|
27
|
-
def windows?
|
28
|
-
host =~ /mswin|mingw32/
|
29
|
-
end
|
30
|
-
|
31
|
-
def system_host
|
32
|
-
RbConfig::CONFIG['host']
|
33
|
-
end
|
34
|
-
|
35
|
-
def cross_build?
|
36
|
-
host != system_host
|
37
|
-
end
|
38
|
-
|
39
|
-
def get_patches(libname, version)
|
40
|
-
patches = []
|
41
|
-
|
42
|
-
patch_path = File.expand_path(
|
43
|
-
File.join('..','..','..','patches',libname,version),
|
44
|
-
__FILE__
|
45
|
-
)
|
46
|
-
|
47
|
-
patches.concat(Dir[File.join(patch_path, '*.patch')].sort)
|
48
|
-
patches.concat(Dir[File.join(patch_path, '*.diff')].sort)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
data/test/appveyor/dbsetup.ps1
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
Write-Output "Setting up..."
|
3
|
-
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
|
4
|
-
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null
|
5
|
-
|
6
|
-
Write-Output "Setting variables..."
|
7
|
-
$serverName = $env:COMPUTERNAME
|
8
|
-
$instances = @('SQL2012SP1', 'SQL2014', 'SQL2016')
|
9
|
-
$smo = 'Microsoft.SqlServer.Management.Smo.'
|
10
|
-
$wmi = new-object ($smo + 'Wmi.ManagedComputer')
|
11
|
-
|
12
|
-
Write-Output "Configure Instances..."
|
13
|
-
foreach ($instance in $instances) {
|
14
|
-
Write-Output "Instance $instance ..."
|
15
|
-
Write-Output "Enable TCP/IP and port 1433..."
|
16
|
-
$uri = "ManagedComputer[@Name='$serverName']/ServerInstance[@Name='$instance']/ServerProtocol[@Name='Tcp']"
|
17
|
-
$tcp = $wmi.GetSmoObject($uri)
|
18
|
-
$tcp.IsEnabled = $true
|
19
|
-
foreach ($ipAddress in $Tcp.IPAddresses) {
|
20
|
-
$ipAddress.IPAddressProperties["TcpDynamicPorts"].Value = ""
|
21
|
-
$ipAddress.IPAddressProperties["TcpPort"].Value = "1433"
|
22
|
-
}
|
23
|
-
$tcp.Alter()
|
24
|
-
}
|
25
|
-
|
26
|
-
Set-Service SQLBrowser -StartupType Manual
|
27
|
-
Start-Service SQLBrowser
|
data/test/appveyor/dbsetup.sql
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
CREATE DATABASE [tinytdstest];
|
2
|
-
GO
|
3
|
-
CREATE LOGIN [tinytds] WITH PASSWORD = '', CHECK_POLICY = OFF, DEFAULT_DATABASE = [tinytdstest];
|
4
|
-
GO
|
5
|
-
USE [tinytdstest];
|
6
|
-
CREATE USER [tinytds] FOR LOGIN [tinytds];
|
7
|
-
GO
|
8
|
-
EXEC sp_addrolemember N'db_owner', N'tinytds';
|
9
|
-
GO
|
data/test/benchmark/query.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
$:.unshift File.expand_path('../../../lib',__FILE__)
|
2
|
-
require 'rubygems'
|
3
|
-
require 'bench_press'
|
4
|
-
require 'tiny_tds'
|
5
|
-
require 'odbc'
|
6
|
-
require 'odbc_utf8'
|
7
|
-
|
8
|
-
extend BenchPress
|
9
|
-
|
10
|
-
author 'Ken Collins'
|
11
|
-
summary 'Query everything.'
|
12
|
-
|
13
|
-
reps 1_000
|
14
|
-
|
15
|
-
@odbc = ODBC.connect ENV['TINYTDS_UNIT_DATASERVER'], 'tinytds', ''
|
16
|
-
@odbc.use_time = true
|
17
|
-
|
18
|
-
@odbc_utf8 = ODBC_UTF8.connect ENV['TINYTDS_UNIT_DATASERVER'], 'tinytds', ''
|
19
|
-
@odbc_utf8.use_time = true
|
20
|
-
|
21
|
-
@tinytds = TinyTds::Client.new(
|
22
|
-
:dataserver => ENV['TINYTDS_UNIT_DATASERVER'],
|
23
|
-
:username => 'tinytds',
|
24
|
-
:password => '',
|
25
|
-
:database => 'tinytdstest',
|
26
|
-
:appname => 'TinyTds Dev',
|
27
|
-
:login_timeout => 5,
|
28
|
-
:timeout => 5 )
|
29
|
-
|
30
|
-
@query_all = "SELECT * FROM [datatypes]"
|
31
|
-
|
32
|
-
|
33
|
-
measure "ODBC (ascii-8bit)" do
|
34
|
-
h = @odbc.run(@query_all)
|
35
|
-
h.fetch_all
|
36
|
-
h.drop
|
37
|
-
end
|
38
|
-
|
39
|
-
# measure "ODBC (utf8)" do
|
40
|
-
# h = @odbc_utf8.run(@query_all)
|
41
|
-
# h.fetch_all
|
42
|
-
# h.drop
|
43
|
-
# end
|
44
|
-
|
45
|
-
measure "TinyTDS (row caching)" do
|
46
|
-
@tinytds.execute(@query_all).each
|
47
|
-
end
|
48
|
-
|
49
|
-
measure "TinyTDS (no caching)" do
|
50
|
-
@tinytds.execute(@query_all).each(:cache_rows => false)
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
=begin
|
56
|
-
|
57
|
-
Author: Ken Collins
|
58
|
-
Date: January 22, 2011
|
59
|
-
Summary: Query everything.
|
60
|
-
|
61
|
-
System Information
|
62
|
-
------------------
|
63
|
-
Operating System: Mac OS X 10.6.6 (10J567)
|
64
|
-
CPU: Intel Core 2 Duo 1.6 GHz
|
65
|
-
Processor Count: 2
|
66
|
-
Memory: 4 GB
|
67
|
-
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.3], MBARI 0x6770, Ruby Enterprise Edition 2010.02
|
68
|
-
|
69
|
-
"TinyTDS (row caching)" is up to 79% faster over 1,000 repetitions
|
70
|
-
------------------------------------------------------------------
|
71
|
-
|
72
|
-
TinyTDS (row caching) 4.90862512588501 secs Fastest
|
73
|
-
TinyTDS (no caching) 4.91626906394958 secs 0% Slower
|
74
|
-
ODBC (ascii-8bit) 23.959536075592 secs 79% Slower
|
75
|
-
|
76
|
-
=end
|
77
|
-
|