tiny_tds 3.2.0-aarch64-linux-gnu

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.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +20 -0
  3. data/.gitattributes +1 -0
  4. data/.github/workflows/ci.yml +590 -0
  5. data/.gitignore +22 -0
  6. data/.rubocop.yml +31 -0
  7. data/CHANGELOG.md +305 -0
  8. data/CODE_OF_CONDUCT.md +31 -0
  9. data/Gemfile +2 -0
  10. data/ISSUE_TEMPLATE.md +38 -0
  11. data/MIT-LICENSE +23 -0
  12. data/README.md +493 -0
  13. data/Rakefile +67 -0
  14. data/VERSION +1 -0
  15. data/bin/defncopy-ttds +3 -0
  16. data/bin/tsql-ttds +3 -0
  17. data/docker-compose.yml +34 -0
  18. data/exe/.keep +0 -0
  19. data/ext/tiny_tds/client.c +492 -0
  20. data/ext/tiny_tds/client.h +53 -0
  21. data/ext/tiny_tds/extconf.rb +190 -0
  22. data/ext/tiny_tds/extconsts.rb +8 -0
  23. data/ext/tiny_tds/result.c +626 -0
  24. data/ext/tiny_tds/result.h +32 -0
  25. data/ext/tiny_tds/tiny_tds_ext.c +15 -0
  26. data/ext/tiny_tds/tiny_tds_ext.h +17 -0
  27. data/lib/tiny_tds/2.7/tiny_tds.so +0 -0
  28. data/lib/tiny_tds/3.0/tiny_tds.so +0 -0
  29. data/lib/tiny_tds/3.1/tiny_tds.so +0 -0
  30. data/lib/tiny_tds/3.2/tiny_tds.so +0 -0
  31. data/lib/tiny_tds/3.3/tiny_tds.so +0 -0
  32. data/lib/tiny_tds/3.4/tiny_tds.so +0 -0
  33. data/lib/tiny_tds/bin.rb +90 -0
  34. data/lib/tiny_tds/client.rb +132 -0
  35. data/lib/tiny_tds/error.rb +12 -0
  36. data/lib/tiny_tds/gem.rb +23 -0
  37. data/lib/tiny_tds/result.rb +5 -0
  38. data/lib/tiny_tds/version.rb +3 -0
  39. data/lib/tiny_tds.rb +42 -0
  40. data/patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff +34 -0
  41. data/patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff +28 -0
  42. data/patches/libiconv/1.14/1-avoid-gets-error.patch +17 -0
  43. data/ports/aarch64-linux-gnu/bin/defncopy +0 -0
  44. data/ports/aarch64-linux-gnu/bin/tsql +0 -0
  45. data/ports/aarch64-linux-gnu/lib/libsybdb.so.5 +0 -0
  46. data/setup_cimgruby_dev.sh +25 -0
  47. data/start_dev.sh +21 -0
  48. data/tasks/native_gem.rake +16 -0
  49. data/tasks/package.rake +6 -0
  50. data/tasks/ports.rake +24 -0
  51. data/tasks/test.rake +7 -0
  52. data/test/bin/install-freetds.sh +18 -0
  53. data/test/bin/install-mssql.ps1 +42 -0
  54. data/test/bin/install-mssqltools.sh +9 -0
  55. data/test/bin/install-openssl.sh +18 -0
  56. data/test/bin/restore-from-native-gem.ps1 +10 -0
  57. data/test/bin/setup_tinytds_db.sh +7 -0
  58. data/test/bin/setup_volume_permissions.sh +10 -0
  59. data/test/client_test.rb +266 -0
  60. data/test/gem_test.rb +100 -0
  61. data/test/result_test.rb +708 -0
  62. data/test/schema/1px.gif +0 -0
  63. data/test/schema/sqlserver_2017.sql +140 -0
  64. data/test/schema/sqlserver_azure.sql +140 -0
  65. data/test/schema_test.rb +417 -0
  66. data/test/sql/db-create.sql +18 -0
  67. data/test/sql/db-login.sql +38 -0
  68. data/test/test_helper.rb +244 -0
  69. data/test/thread_test.rb +89 -0
  70. data/tiny_tds.gemspec +31 -0
  71. metadata +259 -0
data/CHANGELOG.md ADDED
@@ -0,0 +1,305 @@
1
+ ## 3.2.0
2
+
3
+ * Reduce number of files shipped with precompiled Windows gem
4
+ * Provide precompiled gem for Linux (GNU + MUSL / 64-bit x86 + ARM)
5
+ * Fix wrappers for `tsql` and `defncopy` utility.
6
+ * Use libiconv v1.18 and freetds v1.4.26 for Windows and Linux builds
7
+
8
+ ## 3.1.0
9
+
10
+ * Add Ruby 3.4 to the cross compile list
11
+
12
+ ## 3.0.0
13
+
14
+ * Drop support for Ruby < 2.7
15
+ * Drop support for SQL Server < 2017
16
+ * Drop support for FreeTDS < 1.0
17
+ * No longer provide a 32-bit Windows build
18
+ * Raise error if FreeTDS is unable to send command buffer to the server
19
+ * Use freetds v1.4.23, libiconv v1.17 and OpenSSL v3.4.0 for Windows builds
20
+ * Add `bigdecimal` to dependencies
21
+
22
+ ## 2.1.7
23
+
24
+ * Add Ruby 3.3 to the cross compile list
25
+
26
+ ## 2.1.6
27
+
28
+ * Add Ruby 3.0, 3.1, and 3.2 to the cross compile list
29
+ * Fix segfault when asking if client was dead after closing it. Fixes #519.
30
+ * Mark `alloc` function as undefined on `TinyTds::Result`. Fixes #515.
31
+ * Fix Gem installation on Windows by adding default freetds msys path. Fixes #522
32
+ * Search for `freetds` in `/opt/homebrew` when installing on Apple Silicon. Fixes #484, #492 and #508.
33
+
34
+ ## 2.1.5
35
+
36
+ * Fix compilation errors for Amazon Linux 1. Fixes #495.
37
+ * Fix segfault for login timeouts
38
+
39
+ ## 2.1.4
40
+
41
+ * Improve handling of network related timeouts
42
+ * Fix error reporting when preceded by info message
43
+
44
+ ## 2.1.3
45
+
46
+ * Removed old/unused appveyor config
47
+ * Remove old Rubies from CI & cross compile list
48
+ * Add Ruby 2.6 and 2.7 to the cross compile list
49
+
50
+ ## 2.1.2
51
+
52
+ * Use Kernel.BigDecimal vs BigDecimal.new. Fixes #409.
53
+ * Change `DBSETUTF16` abscence warning message. Fixes #410.
54
+ * Add Windows binary for Ruby-2.5. Fixes #408.
55
+
56
+ ## 2.1.1
57
+
58
+ * Move message_handler from a shared value to userdata.
59
+
60
+
61
+ ## 2.1.0
62
+
63
+ * Support RubyInstaller2 for Windows. Fixes #365.
64
+ * Support the FREETDS_DIR environment variable. Fixes #371.
65
+ * Rename binstubs to tsql-ttds and defncopy-ttds
66
+ * Support separate timeout values per connection Fixes #348.
67
+ * Allow client proc to capture INFO messages. Fixes #352.
68
+ * Use official HTTP mirrors instead of FTP. Fixes #384.
69
+
70
+
71
+ ## 2.0.0
72
+
73
+ * Stop building FreeTDS as a part of the extension build.
74
+
75
+
76
+ ## 1.3.0
77
+
78
+ * FreeTDS: Link libgcc statically for Windows. (#351) Fixes #349.
79
+
80
+
81
+ ## 1.2.0
82
+
83
+ * Use OpenSSL v1.1.0e & FreeTDS v1.00.27 for Windows builds.
84
+
85
+
86
+ ## 1.1.0
87
+
88
+ * Use rake-compiler-dock v0.6.0
89
+ * Handle SYBVARIANT types from SQL function. Fixes #317. Fixed #321.
90
+ * Fix `use_utf16` optoin for booleans. Fixes #314
91
+ * Add `-q` check for bin puts. Fixes #318
92
+ * Use FreeTDS 1.00.21.
93
+ * Appveyor tests only 2012, 2014 with one Ruby, 23-x64.
94
+ * CircleCI & TravisCI both test 2016.
95
+
96
+
97
+ ## 1.0.5
98
+
99
+ * Windows Static Builds - Use FreeTDS 1.00.15, OpenSSL 1.0.2j.
100
+ * Appveyor tests 2012, 2014, 2016.
101
+ * Error messages greater than 1024 chars generates a buffer overflow. Fixes #293.
102
+ * Ensures numeric options are treated numerically Fixes #303.
103
+ * New `:contained` login option. May deprecate `:azure`. Fixes #292.
104
+ * New `:use_utf16` login option. Toggle UCS-2 or UTF-16. Default true.
105
+
106
+
107
+ ## 1.0.4
108
+
109
+ * Use FreeTDS 1.0 final
110
+
111
+
112
+ ## 1.0.3
113
+
114
+ * Use FreeTDS 1.0rc5 for cross compile windows gems.
115
+ * Ensure we only work with latest FreeTDS v0.95.x or higher.
116
+
117
+
118
+ ## 1.0.2
119
+
120
+ * Cross compile w/2.3.0 using rake-compiler-dock ~> 0.5.1. Fixes #268 #270.
121
+ * Use FreeTDS 1.0rc4 for cross compile windows gems.
122
+
123
+
124
+ ## 1.0.1
125
+
126
+ * Fix ruby exe's in non-platform gem.
127
+
128
+
129
+ ## 1.0.0
130
+
131
+ * Tested with FreeTDS 1.0.
132
+ * Add emoji support by default using FreeTDS v1.0 in docs.
133
+
134
+
135
+ * 0.9.5 * (release candidates only)
136
+
137
+ * Binstub wrappers for `tsql`. Fixes #227 #251
138
+ * Add support for 2008 data types. Must use TDSVER 7.3 or higher. Fixes #244 #251
139
+ - [date]
140
+ - [datetime2]
141
+ - [datetimeoffset]
142
+ - [time]
143
+ * Default FreeTDS to 0.95. Support 0.91 Alternate Fixes #233
144
+ - Allow our `tds_version` to mirror TDSVER env var. Ex '7.3' vs '73'.
145
+ - Change error handler for `SYBEICONVO` to hard return INT_CANCEL.
146
+ * Made sure Azure logins are user@short vs. long domain. Fixes #229
147
+ * Removed Ruby 1.9.3 from CI builds.
148
+ * CI now tests Azure too.
149
+ * Fixed compiler warnings on all platforms. Fixed #241
150
+ * FreeTDS - Remove support for bad iconv.
151
+
152
+
153
+ ## 0.7.0
154
+
155
+ * Refactor build of FreeTDS & Iconv recipes. Add OpenSSL. Merged #207.
156
+ * Ensure zero terminated strings, where C-str pointers are expected. Use StringValueCStr() Fixes #208.
157
+ * Revert 999fa571 so timeouts do not kill the client. Fixes #179.
158
+ * Remove `sspi_w_kerberos.diff` patch. Not needed anymore.
159
+ * Tested again on Azure. Added notes to README on recommended settings.
160
+ * Replace `rb_thread_blocking_region` (removed in Ruby 2.2.0) w/`rb_thread_call_without_gvl`. Fixes #182.
161
+ * Remove 30 char password warning. Fixes #172.
162
+ * Remove Ruby 1.8.6 support. We always use Time vs edge case DateTime.
163
+
164
+
165
+ ## 0.6.2
166
+
167
+ * Support an optional environment variable to find FreeTDS. Fixes #128.
168
+ * Allow Support for 31+ Character Usernames/Passwords. Fixes #134. Thanks @wbond.
169
+ * Stronger Global VM Lock support for nonblocking connections. Fixes #133. Thanks @wbond.
170
+ * Timeout fix for working with Azure SQL. Fixes #138.
171
+ * Correctly handle requests that return multiple results sets via `.do`, such
172
+ as backups and restores. Fixes #150.
173
+
174
+
175
+ ## 0.6.1
176
+
177
+ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
178
+
179
+
180
+ ## 0.6.0
181
+
182
+ * Use dbsetversion() vs. dbsetlversion. Fixes #62.
183
+ * Remove Ruby 1.8 support.
184
+ * Implement misc rb_thread_blocking_region support. Fixes #121. Thanks @lepfhty.
185
+ * Test FreeTDS v0.91.89 patch release.
186
+ * Fix lost connection handling. Fixes #124. Thanks @krzcho.
187
+ * Remove unused variable. Fixes #103. Thanks @jeremyevans.
188
+ * Remove need to specify username for Windows Authentication.
189
+ * Use proper SQL for returning IDENTITY with Sybase. Fixes #95.
190
+ * Compile windows with `--enable-sspi`.
191
+ * Allow MiniPortile to build any FreeTDS version we need. Fixes #76.
192
+ * Always convert password option to string. Fixes #92.
193
+ * Move test system to real MiniTest::Spec. All tests pass on Azure too.
194
+ * Raise and handle encoding errors on DB writes. Fixes #89.
195
+
196
+
197
+ ## 0.5.1
198
+
199
+ * Change how we configure with iconv, basically it is always needed. Fixes #11 & #69.
200
+
201
+
202
+ ## 0.5.0
203
+
204
+ * Copy mysql2s handling of Time and Datetime so 64bit systems are leveraged. Fixes #46 and #47. Thanks @lsylvester!
205
+ * Add CFLAGS='-fPIC' for libtool. Fix TDS version configs in our ports file. Document. Fixes #45
206
+ * Update our TDS version constants to reflect changed 8.0/9.0 to 7.1/7.2 DBLIB versions in FreeTDS
207
+ while making it backward compatible, again like FreeTDS. Even tho you can not configure FreeTDS with
208
+ TDS version 7.2 or technically even use it, I added tests to prove that we correctly handle both
209
+ varchar(max) and nvarchar(max) with large amounts of data.
210
+ * FreeTDS 0.91 has been released. Update our port scripts.
211
+ * Add test for 0.91 and higher to handle incorrect syntax in sp_executesql.
212
+ * Returning empty result sets with a command batch that has multiple statements is now the default. Use :empty_sets => false to override.
213
+ * Do not raise a TinyTds::Error with our message handler unless the severity is greater than 10.
214
+
215
+
216
+ ## 0.4.5
217
+
218
+ * Includes precompiled Windows binaries for FreeTDS 0.91rc2 & LibIconv. No precompiled OpenSSL yet for Windows to SQL Azure.
219
+ * Fixed symbolized unicode column names.
220
+ * Use same bigint ruby functions to return identity. Hopefully fixes #19.
221
+ * Release static libs for Windows.
222
+ * Change how :host/:port are implemented. Now sending "host:port" to :dataserver.
223
+
224
+
225
+ ## 0.4.4
226
+
227
+ * New :host/:port connection options. Removes need for freetds.conf file.
228
+
229
+
230
+ ## 0.4.3
231
+
232
+ * New Client#active? method to check for good connection. Always use this abstract method.
233
+ * Better SYBEWRIT "Write to SQL Server failed." error handling. New Client#dead? check.
234
+ * Azure tested using latest FreeTDS with submitted patch. https://gist.github.com/889190
235
+
236
+
237
+ ## 0.4.2
238
+
239
+ * Iconv is a dep only when compiling locally. However, left in the ability to configure
240
+ it for native gem installation but you must use
241
+ --enable-iconv before using --with-iconv-dir=/some/dir
242
+ * Really fix what 0.4.1 was supposed to do, force SYBDBLIB compile.
243
+
244
+
245
+ ## 0.4.1
246
+
247
+ * Undefine MSDBLIB in case others have explicitly compiled FreeTDS with "MS db-lib source compatibility: yes".
248
+
249
+
250
+ ## 0.4.0
251
+
252
+ * Allow SYBEICONVI errors to pass thru so that bad data is converted to ? marks.
253
+ * Build native deps using MiniPortile [Luis Lavena]
254
+ * Allow Result#fields to be called before iterating over the results.
255
+ * Two new client helper methods, #sqlsent? and #canceled?. Possible to use these to determine current
256
+ state of the client and the need to use Result#cancel to stop processing active results. It is also
257
+ safe to call Result#cancel over and over again.
258
+ * Look for the syb headers only.
259
+ * Fix minitest global matchers warnings.
260
+ * Fix test warnings.
261
+
262
+
263
+ ## 0.3.2
264
+
265
+ * Small changes while testing JRuby. Using options hash for connect vs many args.
266
+
267
+
268
+ ## 0.3.1
269
+
270
+ * Fix bad gem build.
271
+
272
+
273
+ ## 0.3.0
274
+
275
+ * Access stored procedure return codes.
276
+ * Make sure dead or not enabled connections are handled.
277
+ * Fix bad client after timeout & read from server errors.
278
+
279
+
280
+ ## 0.2.3
281
+
282
+ * Do not use development ruby/version, but simple memoize an eval check on init to find out, for 1.8.6 reflection.
283
+
284
+
285
+ ## 0.2.2
286
+
287
+ * Fixed failing test in Ruby 1.8.6. DateTime doesn't support fractional seconds greater than 59.
288
+ See: http://redmine.ruby-lang.org/issues/show/1490 [Erik Bryn]
289
+
290
+
291
+ ## 0.2.1
292
+
293
+ * Compatibility with 32-bit systems. Better cross language testing. [Klaus Gundermann]
294
+
295
+
296
+ ## 0.2.0
297
+
298
+ * Convert GUID's in a more compatible way. [Klaus Gundermann]
299
+ * Handle multiple result sets in command buffer or stored procs. [Ken Collins]
300
+ * Fixed some compiler warnings. [Erik Bryn]
301
+ * Avoid segfault related to smalldatetime conversion. [Erik Bryn]
302
+ * Properly encode column names in 1.9. [Erik Bryn]
303
+
304
+
305
+ ## 0.1.0 Initial release!
@@ -0,0 +1,31 @@
1
+ Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all
4
+ people who contribute through reporting issues, posting feature requests,
5
+ updating documentation, submitting pull requests or patches, and other
6
+ activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, or religion.
12
+
13
+ Examples of unacceptable behavior by participants include the use of sexual
14
+ language or imagery, derogatory comments or personal attacks, trolling, public
15
+ or private harassment, insults, or other unprofessional conduct.
16
+
17
+ Project maintainers have the right and responsibility to remove, edit, or
18
+ reject comments, commits, code, wiki edits, issues, and other contributions
19
+ that are not aligned to this Code of Conduct. Project maintainers who do not
20
+ follow the Code of Conduct may be removed from the project team.
21
+
22
+ This code of conduct applies both within project spaces and in public spaces
23
+ when an individual is representing the project or its community.
24
+
25
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
26
+ reported by opening an issue or contacting one or more of the project
27
+ maintainers.
28
+
29
+ This Code of Conduct is adapted from the Contributor Covenant
30
+ (http://contributor-covenant.org), version 1.1.0, available at
31
+ http://contributor-covenant.org/version/1/1/0/
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
data/ISSUE_TEMPLATE.md ADDED
@@ -0,0 +1,38 @@
1
+ ## Before submitting an issue please check these first!
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.
5
+ * Are you using FreeTDS 1.0.0 or later? Check `$ tsql -C` to find out.
6
+ * If not, please update then uninstall the TinyTDS gem and re-install it.
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.
data/MIT-LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ Copyright (c) 2010-2014 Ken Collins <ken@metaskills.net>,
2
+ Will Bond (Veracross LLC) <wbond@breuer.com>
3
+
4
+ Permission is hereby granted, free of charge, to any person
5
+ obtaining a copy of this software and associated documentation
6
+ files (the "Software"), to deal in the Software without
7
+ restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
+ OTHER DEALINGS IN THE SOFTWARE.