tiny_tds 1.1.0-x64-mingw32 → 1.2.0.beta1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -0
- data/README.md +26 -6
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/ext/tiny_tds/extconf.rb +20 -7
- data/ext/tiny_tds/extconsts.rb +2 -2
- data/ports/patches/freetds/{1.00.21 → 1.00.27}/0001-mingw_missing_inet_pton.diff +4 -4
- data/test/bin/install-openssl.sh +1 -1
- data/test/bin/setup.sh +6 -4
- data/test/result_test.rb +1 -1
- data/test/schema_test.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72483cb7d871b8be5f81500ebefcf3b98a0881c4
|
4
|
+
data.tar.gz: 8a48cf9621db729fb9327902e9a75e3ede455cb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 462740c96c263441db5e64c6b75b0aa3448c455cb4e2b8faf45167b0953ce63bd257b4539ea3981b1e2922c2ddb5a1dc9cc56485ce08a1c0933fbf6c4f1e199e
|
7
|
+
data.tar.gz: 85de8cf29e8267aec9429baf43d807a3e6339358d2e61d834d158e9378b8441140e2ba24ccc2082f1d103affc988a8031b94abc0a4783f5cea9ab1a8e69c3ecb
|
data/.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.diff eol=lf
|
data/README.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
* [![Build Status](https://ci.appveyor.com/api/projects/status/g2bhhbsdkx0mal55/branch/master?svg=true)](https://ci.appveyor.com/project/rails-sqlserver/tiny-tds/branch/master) - Appveyor
|
6
6
|
* [![Code Climate](https://codeclimate.com/github/rails-sqlserver/tiny_tds/badges/gpa.svg)](https://codeclimate.com/github/rails-sqlserver/tiny_tds) - Code Climate
|
7
7
|
* [![Gem Version](https://img.shields.io/gem/v/tiny_tds.svg)](https://rubygems.org/gems/tiny_tds) - Gem Version
|
8
|
+
* [![Dependency Status](https://dependencyci.com/github/rails-sqlserver/tiny_tds/badge)](https://dependencyci.com/github/rails-sqlserver/tiny_tds) - Dependency Status
|
8
9
|
* [![Gitter chat](https://img.shields.io/badge/%E2%8A%AA%20GITTER%20-JOIN%20CHAT%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/rails-sqlserver/activerecord-sqlserver-adapter) - Community
|
9
10
|
|
10
11
|
The TinyTDS gem is meant to serve the extremely common use-case of connecting, querying and iterating over results to Microsoft SQL Server or Sybase databases from Ruby using the FreeTDS's DB-Library API.
|
@@ -331,19 +332,38 @@ TinyTDS is fully tested with the Azure platform. You must set the `azure: true`
|
|
331
332
|
|
332
333
|
**IMPORTANT**: Do not use `username@server.database.windows.net` for the username connection option! You must use the shorter `username@server` instead!
|
333
334
|
|
334
|
-
|
335
|
+
Also, please read the [Azure SQL Database General Guidelines and Limitations](https://msdn.microsoft.com/en-us/library/ee336245.aspx) MSDN article to understand the differences. Specifically, the connection constraints section!
|
336
|
+
|
337
|
+
## Connection Settings
|
338
|
+
|
339
|
+
A DBLIB connection does not have the same default SET options for a standard SMS SQL Server connection. Hence, we recommend the following options post establishing your connection.
|
340
|
+
|
341
|
+
#### SQL Server
|
335
342
|
|
336
343
|
```sql
|
337
|
-
SET
|
344
|
+
SET ANSI_DEFAULTS ON
|
345
|
+
|
346
|
+
SET QUOTED_IDENTIFIER ON
|
338
347
|
SET CURSOR_CLOSE_ON_COMMIT OFF
|
339
|
-
SET ANSI_NULL_DFLT_ON ON
|
340
348
|
SET IMPLICIT_TRANSACTIONS OFF
|
349
|
+
SET TEXTSIZE 2147483647
|
350
|
+
SET CONCAT_NULL_YIELDS_NULL ON
|
351
|
+
```
|
352
|
+
|
353
|
+
#### Azure
|
354
|
+
|
355
|
+
```sql
|
356
|
+
SET ANSI_NULLS ON
|
357
|
+
SET ANSI_NULL_DFLT_ON ON
|
341
358
|
SET ANSI_PADDING ON
|
342
|
-
SET QUOTED_IDENTIFIER ON
|
343
359
|
SET ANSI_WARNINGS ON
|
344
|
-
```
|
345
360
|
|
346
|
-
|
361
|
+
SET QUOTED_IDENTIFIER ON
|
362
|
+
SET CURSOR_CLOSE_ON_COMMIT OFF
|
363
|
+
SET IMPLICIT_TRANSACTIONS OFF
|
364
|
+
SET TEXTSIZE 2147483647
|
365
|
+
SET CONCAT_NULL_YIELDS_NULL ON
|
366
|
+
```
|
347
367
|
|
348
368
|
|
349
369
|
## Thread Safety
|
data/Rakefile
CHANGED
@@ -68,8 +68,8 @@ Rake::ExtensionTask.new('tiny_tds', gemspec) do |ext|
|
|
68
68
|
gemplat = spec.platform.to_s
|
69
69
|
host = platform_host_map[gemplat]
|
70
70
|
dlls = [
|
71
|
-
"
|
72
|
-
"
|
71
|
+
"libcrypto32-#{OPENSSL_VERSION}-#{host}.dll",
|
72
|
+
"libssl32-#{OPENSSL_VERSION}-#{host}.dll",
|
73
73
|
'libiconv-2.dll',
|
74
74
|
'libsybdb-5.dll'
|
75
75
|
]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0.beta1
|
data/ext/tiny_tds/extconf.rb
CHANGED
@@ -151,6 +151,19 @@ def define_libssl_recipe(host)
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
154
|
+
def execute(action, command, options={})
|
155
|
+
prev_path = ENV['PATH']
|
156
|
+
if host=~/mingw/
|
157
|
+
git_perl = 'C:/Program Files/Git/usr/bin'
|
158
|
+
if File.directory?(git_perl)
|
159
|
+
ENV['PATH'] = git_perl + ';' + ENV['PATH']
|
160
|
+
ENV['PERL'] = 'perl'
|
161
|
+
end
|
162
|
+
end
|
163
|
+
super
|
164
|
+
ENV['PATH'] = prev_path
|
165
|
+
end
|
166
|
+
|
154
167
|
def configure
|
155
168
|
config = if host=~/mingw/
|
156
169
|
host=~/x86_64/ ? 'mingw64' : 'mingw'
|
@@ -181,20 +194,20 @@ def define_libssl_recipe(host)
|
|
181
194
|
|
182
195
|
def compile
|
183
196
|
super
|
184
|
-
# OpenSSL DLLs are called "
|
197
|
+
# OpenSSL DLLs are called "libcrypto32.dll" and "libssl32.dll" per default,
|
185
198
|
# regardless to the version. This is best suited to meet the Windows DLL hell.
|
186
199
|
# To avoid any conflicts we do a static build and build DLLs afterwards,
|
187
200
|
# with our own naming scheme.
|
188
|
-
execute "mkdef-
|
189
|
-
execute "mkdef-
|
190
|
-
dllwrap("
|
191
|
-
dllwrap("
|
201
|
+
execute "mkdef-crypto32", "(perl util/mkdef.pl crypto 32 >libcrypto32.def)"
|
202
|
+
execute "mkdef-ssl32", "(perl util/mkdef.pl ssl 32 >libssl32.def)"
|
203
|
+
dllwrap("libcrypto32-#{version}-#{host}", "libcrypto.dll.a", "libcrypto32.def", "libcrypto.a -lws2_32 -lgdi32 -lcrypt32")
|
204
|
+
dllwrap("libssl32-#{version}-#{host}", "libssl.dll.a", "libssl32.def", "libssl.a libcrypto.dll.a")
|
192
205
|
end
|
193
206
|
|
194
207
|
def install
|
195
208
|
super
|
196
|
-
FileUtils.cp "#{work_path}/
|
197
|
-
FileUtils.cp "#{work_path}/
|
209
|
+
FileUtils.cp "#{work_path}/libcrypto32-#{version}-#{host}.dll", "#{path}/bin/"
|
210
|
+
FileUtils.cp "#{work_path}/libssl32-#{version}-#{host}.dll", "#{path}/bin/"
|
198
211
|
FileUtils.cp "#{work_path}/libcrypto.dll.a", "#{path}/lib/"
|
199
212
|
FileUtils.cp "#{work_path}/libssl.dll.a", "#{path}/lib/"
|
200
213
|
end
|
data/ext/tiny_tds/extconsts.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.14"
|
3
3
|
ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz"
|
4
4
|
|
5
|
-
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.
|
5
|
+
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.0e'
|
6
6
|
OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
|
7
7
|
|
8
|
-
FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.00.
|
8
|
+
FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.00.27"
|
9
9
|
FREETDS_VERSION_INFO = Hash.new { |h,k|
|
10
10
|
h[k] = {files: "ftp://ftp.freetds.org/pub/freetds/stable/freetds-#{k}.tar.bz2"}
|
11
11
|
}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
diff --git a/src/tds/tls.c b/src/tds/tls.c
|
2
|
-
index
|
2
|
+
index 09e7fa0..1da18f6 100644
|
3
3
|
--- a/src/tds/tls.c
|
4
4
|
+++ b/src/tds/tls.c
|
5
|
-
@@ -
|
6
|
-
#define SSL_PTR bio
|
5
|
+
@@ -101,6 +101,29 @@
|
6
|
+
#define SSL_PTR BIO_get_data(bio)
|
7
7
|
#endif
|
8
8
|
|
9
9
|
+/*
|
10
10
|
+ * Add a workaround for older Mingw versions without inet_pton().
|
11
11
|
+ * This means RubyInstallers DevKit-4.7.2 in particular.
|
12
12
|
+ */
|
13
|
-
+#if defined(
|
13
|
+
+#if defined(__MINGW32__) && !defined(InetPtonA)
|
14
14
|
+ #include <windows.h>
|
15
15
|
+
|
16
16
|
+ static HMODULE ws2_32 = NULL;
|
data/test/bin/install-openssl.sh
CHANGED
@@ -10,7 +10,7 @@ fi
|
|
10
10
|
wget https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
|
11
11
|
tar -xzf openssl-$OPENSSL_VERSION.tar.gz
|
12
12
|
cd openssl-$OPENSSL_VERSION
|
13
|
-
./config --prefix=/
|
13
|
+
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
|
14
14
|
make
|
15
15
|
make install
|
16
16
|
cd ..
|
data/test/bin/setup.sh
CHANGED
@@ -3,15 +3,17 @@
|
|
3
3
|
set -x
|
4
4
|
set -e
|
5
5
|
|
6
|
-
|
6
|
+
tag=1.3
|
7
7
|
|
8
|
-
|
8
|
+
docker pull metaskills/mssql-server-linux-tinytds:$tag
|
9
|
+
|
10
|
+
container=$(docker ps -a -q --filter ancestor=metaskills/mssql-server-linux-tinytds:$tag)
|
9
11
|
if [[ -z $container ]]; then
|
10
|
-
docker run -p 1433:1433 -d metaskills/mssql-server-linux-tinytds && sleep 10
|
12
|
+
docker run -p 1433:1433 -d metaskills/mssql-server-linux-tinytds:$tag && sleep 10
|
11
13
|
exit
|
12
14
|
fi
|
13
15
|
|
14
|
-
container=$(docker ps -q --filter ancestor=metaskills/mssql-server-linux-tinytds)
|
16
|
+
container=$(docker ps -q --filter ancestor=metaskills/mssql-server-linux-tinytds:$tag)
|
15
17
|
if [[ -z $container ]]; then
|
16
18
|
docker start $container && sleep 10
|
17
19
|
fi
|
data/test/result_test.rb
CHANGED
data/test/schema_test.rb
CHANGED
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: 1.
|
4
|
+
version: 1.2.0.beta1
|
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:
|
13
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mini_portile2
|
@@ -108,6 +108,7 @@ extensions: []
|
|
108
108
|
extra_rdoc_files: []
|
109
109
|
files:
|
110
110
|
- ".codeclimate.yml"
|
111
|
+
- ".gitattributes"
|
111
112
|
- ".gitignore"
|
112
113
|
- ".rubocop.yml"
|
113
114
|
- ".travis.yml"
|
@@ -145,11 +146,11 @@ files:
|
|
145
146
|
- lib/tiny_tds/error.rb
|
146
147
|
- lib/tiny_tds/result.rb
|
147
148
|
- lib/tiny_tds/version.rb
|
148
|
-
- ports/patches/freetds/1.00.
|
149
|
-
- ports/x86_64-w64-mingw32/bin/
|
149
|
+
- ports/patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
|
150
|
+
- ports/x86_64-w64-mingw32/bin/libcrypto32-1.1.0e-x86_64-w64-mingw32.dll
|
150
151
|
- ports/x86_64-w64-mingw32/bin/libiconv-2.dll
|
152
|
+
- ports/x86_64-w64-mingw32/bin/libssl32-1.1.0e-x86_64-w64-mingw32.dll
|
151
153
|
- ports/x86_64-w64-mingw32/bin/libsybdb-5.dll
|
152
|
-
- ports/x86_64-w64-mingw32/bin/ssleay32-1.0.2j-x86_64-w64-mingw32.dll
|
153
154
|
- test/appveyor/dbsetup.ps1
|
154
155
|
- test/appveyor/dbsetup.sql
|
155
156
|
- test/benchmark/query.rb
|
@@ -188,12 +189,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
189
|
version: 2.0.0
|
189
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
191
|
requirements:
|
191
|
-
- - "
|
192
|
+
- - ">"
|
192
193
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
194
|
+
version: 1.3.1
|
194
195
|
requirements: []
|
195
196
|
rubyforge_project:
|
196
|
-
rubygems_version: 2.
|
197
|
+
rubygems_version: 2.6.8
|
197
198
|
signing_key:
|
198
199
|
specification_version: 4
|
199
200
|
summary: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.
|