ruby-oci8 2.2.3 → 2.2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +427 -0
  3. data/NEWS +335 -42
  4. data/README.md +20 -9
  5. data/dist-files +9 -3
  6. data/docs/bind-array-to-in_cond.md +2 -2
  7. data/docs/conflicts-local-connections-and-processes.md +7 -4
  8. data/docs/hanging-after-inactivity.md +63 -0
  9. data/docs/install-binary-package.md +15 -11
  10. data/docs/install-full-client.md +18 -21
  11. data/docs/install-instant-client.md +45 -27
  12. data/docs/install-on-osx.md +31 -120
  13. data/docs/ldap-auth-and-function-interposition.md +123 -0
  14. data/docs/number-type-mapping.md +79 -0
  15. data/docs/platform-specific-issues.md +17 -50
  16. data/docs/report-installation-issue.md +3 -0
  17. data/docs/timeout-parameters.md +3 -0
  18. data/ext/oci8/apiwrap.c.tmpl +2 -5
  19. data/ext/oci8/apiwrap.rb +6 -1
  20. data/ext/oci8/apiwrap.yml +34 -22
  21. data/ext/oci8/attr.c +4 -2
  22. data/ext/oci8/bind.c +366 -6
  23. data/ext/oci8/connection_pool.c +3 -3
  24. data/ext/oci8/encoding.c +5 -5
  25. data/ext/oci8/env.c +8 -2
  26. data/ext/oci8/error.c +24 -16
  27. data/ext/oci8/extconf.rb +8 -4
  28. data/ext/oci8/hook_funcs.c +274 -61
  29. data/ext/oci8/lob.c +31 -75
  30. data/ext/oci8/metadata.c +2 -2
  31. data/ext/oci8/object.c +72 -27
  32. data/ext/oci8/oci8.c +45 -132
  33. data/ext/oci8/oci8.h +32 -88
  34. data/ext/oci8/oci8lib.c +178 -38
  35. data/ext/oci8/ocihandle.c +37 -37
  36. data/ext/oci8/ocinumber.c +23 -18
  37. data/ext/oci8/oraconf.rb +158 -339
  38. data/ext/oci8/oradate.c +19 -19
  39. data/ext/oci8/plthook.h +10 -0
  40. data/ext/oci8/plthook_elf.c +433 -268
  41. data/ext/oci8/plthook_osx.c +40 -9
  42. data/ext/oci8/plthook_win32.c +9 -0
  43. data/ext/oci8/stmt.c +52 -17
  44. data/ext/oci8/win32.c +4 -22
  45. data/lib/oci8/bindtype.rb +1 -15
  46. data/lib/oci8/check_load_error.rb +57 -10
  47. data/lib/oci8/cursor.rb +57 -25
  48. data/lib/oci8/metadata.rb +9 -1
  49. data/lib/oci8/object.rb +10 -0
  50. data/lib/oci8/oci8.rb +33 -28
  51. data/lib/oci8/oracle_version.rb +11 -1
  52. data/lib/oci8/properties.rb +22 -0
  53. data/lib/oci8/version.rb +1 -1
  54. data/lib/oci8.rb +48 -4
  55. data/lib/ruby-oci8.rb +0 -3
  56. data/pre-distclean.rb +1 -3
  57. data/ruby-oci8.gemspec +3 -8
  58. data/setup.rb +11 -2
  59. data/test/README.md +37 -0
  60. data/test/config.rb +1 -1
  61. data/test/setup_test_object.sql +21 -13
  62. data/test/setup_test_package.sql +59 -0
  63. data/test/test_all.rb +2 -0
  64. data/test/test_bind_boolean.rb +99 -0
  65. data/test/test_bind_integer.rb +47 -0
  66. data/test/test_break.rb +11 -9
  67. data/test/test_clob.rb +4 -16
  68. data/test/test_connstr.rb +29 -13
  69. data/test/test_datetime.rb +8 -3
  70. data/test/test_object.rb +27 -9
  71. data/test/test_oci8.rb +170 -46
  72. data/test/test_oranumber.rb +12 -6
  73. data/test/test_package_type.rb +15 -3
  74. data/test/test_properties.rb +17 -0
  75. metadata +40 -54
  76. data/docs/osx-install-dev-tools.png +0 -0
  77. data/test/README +0 -42
data/NEWS CHANGED
@@ -1,7 +1,300 @@
1
1
  # @markup markdown
2
2
 
3
- 2.2.3
4
- =====
3
+ 2.2.12 (2022-12-30)
4
+ ===================
5
+
6
+ - Fix warning: undefining the allocator of T_DATA class OraNumber against Ruby 3.2.0dev. (GH-243)
7
+ - Fix warnings on tests and on compile.
8
+ - Remove code for old ruby versions.
9
+
10
+ 2.2.11 (2022-02-22)
11
+ ===================
12
+
13
+ - Fix "No DLL is not foud to hook" when `OCI8.properties[:tcp_keepalive_time]` is set and Oracle client is 21c on Windows.
14
+
15
+ (reported at rsim/oracle-enhanced#2262)
16
+
17
+ - Fix "OCI8.properties[:tcp_keepalive_time] isn't available" error when ruby version is 3.1 on Windows.
18
+
19
+ 2.2.10 (2022-01-12)
20
+ ===================
21
+
22
+ - Use `File.exist?` instead of removed `File.exists?` in Ruby 3.2 (GH-242)
23
+
24
+ (contributed by Yasuo Honda)
25
+
26
+ - Support ruby 3.1 distributed by rubyinstaller.org
27
+
28
+ - Remove code for obsolete platforms
29
+ - Ruby compiled by Borland C++
30
+ - macOS released several years ago
31
+
32
+ - Detect arm64 macOS shared library in oraconf.rb in preparation for Instant Client for Apple Silicon release.
33
+
34
+ 2.2.9 (2020-12-30)
35
+ ==================
36
+
37
+ - Support [TruffleRuby](https://github.com/oracle/truffleruby). (GH-225)
38
+
39
+ (contributed by Brandon Fish)
40
+
41
+ - Remove extension libraries for unmaintained ruby versions from binary gems.
42
+
43
+ Fixed issue
44
+ -----------
45
+
46
+ - Allow --with-instant-client-dir along with --with-instant-client-lib/include. (GH-223)
47
+
48
+ (reported by Victor Nawothnig)
49
+
50
+ 2.2.8 (2020-01-11)
51
+ ==================
52
+
53
+ New features
54
+ ------------
55
+
56
+ * Add support to specify include and lib directories of Oracle library on installation. (GH-210)
57
+
58
+ The following three flags are added.
59
+
60
+ * --with-instant-client-dir
61
+ * --with-instant-client-include
62
+ * --with-instant-client-lib
63
+
64
+ Fixed issue
65
+ -----------
66
+
67
+ - Suppress warnings compiling oci8lib.so (GH-212 and others)
68
+
69
+ - Fix compilation and tests on Windows.
70
+
71
+ - Fix spelling in install-instant-client.md (GH-217)
72
+
73
+ - Use fiddler instead obsolete Win32API on Windows (GH-212)
74
+
75
+ 2.2.7 (2019-01-06)
76
+ ==================
77
+
78
+ Incompatible Changes
79
+ --------------------
80
+
81
+ ### `OCI8#long_read_len` and `OCI8#long_read_len=` do nothing.
82
+
83
+ When `LONG`, `LONG RAW` or `XMLTYPE` data were fetched, the data were
84
+ truncated at `OCI8#long_read_len`. The maximum size of data had
85
+ been 4 gigabytes since this release.
86
+
87
+ `OCI8#long_read_len` and `OCI8#long_read_len=` remain for code-compatibility
88
+ but do nothing.
89
+
90
+ Improvement
91
+ -----------
92
+
93
+ ### The number of network round trips was reduced when LOB data are read.
94
+
95
+ When LOB data are read, ruby-oci8 before 2.2.7 does the followings:
96
+
97
+ 1. Gets the size of the LOB.
98
+ 2. Allocate buffer to hold the data.
99
+ 3. Read the LOB contents.
100
+
101
+ This requires two round trips.
102
+
103
+ It now does the followings:
104
+
105
+ 1. Request the server to get LOB contents up to 4 gigabytes.
106
+ 2. Read the LOB contents and allocate buffer when the size is insufficient.
107
+ 3. If the total length of received data is less than 4 gigabytes, all data
108
+ are read. If not, go to the first step to read next 4 gigabytes.
109
+
110
+ This requires only one round trip if the size is less than 4 gigabytes.
111
+
112
+ ### Use array fetching instead of prefetching when LOB columns are in queries
113
+
114
+ When LOB columns are in queries, prefetching doesn't seem to work. Rows
115
+ are fetched one by one according to data captured by network packet sniffer.
116
+ So array fetching is used instead of prefetching to reduce the number of
117
+ network round trips.
118
+
119
+ ### Add error diagnostics when `'require "oci8"'` fails on Windows.
120
+
121
+ When `'require "oci8"'` fails with "OCI.DLL: 126(The specified module could not be found.)"
122
+ on Windows, the cause is not always that OCI.DLL is not found. It may
123
+ be incorrect architecture, missing dependent DLLs and so on.
124
+ Ruby-oci8 checks PATH and DLL files when the error is raised and change
125
+ the error message to reasonable one as possible.
126
+
127
+ 2.2.6.1 (2018-09-16)
128
+ ====================
129
+
130
+ Fixed issue
131
+ -----------
132
+ Fix "No shared library is found to hook." on macOS.
133
+ (rsim/oracle-enhanced#1768)
134
+
135
+ 2.2.6 (2018-08-22)
136
+ ==================
137
+
138
+ This release fixed issues about Oracle 18c except one.
139
+
140
+ Fixed issue
141
+ -----------
142
+
143
+ ### Setting some properties failed with Oracle 18c client
144
+
145
+ Setting `OCI8::properties[:tcp_keepalive_time]` or `OCI8::properties[:cancel_read_at_exit]`
146
+ failed with the error message "No shared library is found to hook" when Oracle
147
+ client version is 18c.
148
+ (rsim/oracle-enhanced#1754)
149
+
150
+ ### Fix `OCI8#oracle_server_version` to get full version of Oracle 18c
151
+
152
+ `OCI8#oracle_server_version` returned Oracle version number whose
153
+ number components after the first dot are zeros such as '18.0.0.0.0'
154
+ even when the server version is `18.3.0.0.0`. This issue was fixed by
155
+ using a new OCI function. However the function is available since
156
+ Oracle 18c client. So when the Oracle client version is 12c or earlier
157
+ and the Oracle server version is 18c or later, it cannot get the *full*
158
+ Oracle version number.
159
+
160
+ ### Fix tests when the Oracle server version is 18c.
161
+
162
+ ### LOB#sync, LOB#sync= and LOB#flush do nothing now.
163
+
164
+ They have not worked by mistake from the beginning because incorrect
165
+ arguments has been passed to OCILobOpen(). Moreover it crashed Oracle
166
+ 18c server-side processes and caused "ORA-03113: end-of-file on
167
+ communication channel."
168
+ (github issue #198)
169
+
170
+ ### `unsupported typecode timestamp` when timestamp with time zone is in object type attributes.
171
+
172
+ (github issue #185)
173
+
174
+ 2.2.5.1 (2017-12-27)
175
+ ====================
176
+
177
+ No updates except tests. The version number was changed just to release
178
+ binary gems for ruby 2.5 on Windows.
179
+
180
+ ### Suppress warnings in tests with ruby 2.5
181
+
182
+ (github issue #180, #181)
183
+
184
+ 2.2.5 (2017-10-21)
185
+ ==================
186
+
187
+ New Features
188
+ ------------
189
+
190
+ ### Try to load $ORACLE_HOME/lib/libclntsh.so also when runtime api check is enabled on Unix.
191
+
192
+ When ruby-oci8 is configured with `--with-runtime-check`, it loads Oracle client
193
+ library and checks available functions in the library at runtime. This feature was
194
+ added to release Windows binary gems which cannot know Oracle version at compile time.
195
+ This is available also on Unix. However it tries to load libraries in LD_LIBRARY_PATH only.
196
+ From this version, it tries to load $ORACLE_HOME/lib/libclntsh.so also.
197
+
198
+ ### Check error reasons when loading failed with 'The specified module could not be found' on Windows.
199
+
200
+ The error messages are same when OCI.DLL isn't found and when Visual
201
+ C++ runtime library depended on by OCI.DLL isn't found. From this
202
+ version, ruby-oci8 distinguishes the difference and prints other message
203
+ for the latter case.
204
+
205
+ Fixed issue
206
+ -----------
207
+
208
+ ### Fix segmentation fault when Oracle client library is prelinked.
209
+
210
+ When Oracle instant client rpm package is used on RHEL5 or RHEL6,
211
+ Oracle client library is modified by [prelink][] and ruby-oci8 crashed
212
+ with segmentation fault. This is not due to Oracle, but due to
213
+ plthook used by ruby-oci8. The plthook was fixed to work with
214
+ prelinked libraries.
215
+ (github issue #172)
216
+
217
+ [prelink]: https://en.wikipedia.org/wiki/Prelink#Linux
218
+
219
+ ### Fix not to hide the original error message of LoadError on recent cygwin.
220
+
221
+ Ruby-oci8 tries to check error messages when `require 'oci8lib_xxx.so` fails.
222
+ However the message was hidden by an exception while checking on cygwin.
223
+ (github issue #176)
224
+
225
+ ### Don't call unnecessary __paramGet(i) when a cursor is executed more than once.
226
+
227
+ pointed by OMOTO Kenji
228
+ (github issue #171)
229
+
230
+ ### Suppress warning: method redefined; discarding old initialize.
231
+
232
+ (github issue #168)
233
+
234
+ Other Changes
235
+ -------------
236
+
237
+ ### Add document about the mapping between Oracle number types and Ruby classes.
238
+
239
+ See {file:docs/number-type-mapping.md Number Type Mapping between Oracle and Ruby}.
240
+ (github issue #173)
241
+
242
+ 2.2.4.1 (2017-06-17)
243
+ ====================
244
+
245
+ Fixed issue
246
+ -----------
247
+
248
+ ### Fix invalid function calls when TCP keepalive time parameter is set on Windows x86
249
+
250
+ When TCP keepalive time parameter is set, The win32 API `setsockopt` was hooked
251
+ with incorrect calling convention on Windows x86. As far as I checked it doesn't
252
+ cause bad effects. But it is by chance. If the code in `oci.dll` is optimized
253
+ differently, it may cause unexpected behavior.
254
+
255
+ ### Fix compilation errors in 2.2.4 on cygwin
256
+
257
+ 2.2.4 (2017-06-11)
258
+ ==================
259
+
260
+ New Features
261
+ ------------
262
+
263
+ ### TCP keepalive parameters
264
+
265
+ `tcp_keepalive` and `tcp_keepalive_time` parameters were added.
266
+ This may fix hanging caused by a firewall after a long period of inactivity
267
+
268
+ See {file:docs/hanging-after-inactivity.md this document} for more detail.
269
+
270
+ ### Workaround of function interposition on Linux and macOS
271
+
272
+ When both `oci8` and `pg` are required and LDAP authentication is used,
273
+ it may trigger segmentation faults or unexpected behaviours.
274
+ This issue was fixed by forcibly modified PLT (Procedure Linkage Table)
275
+ entries in the Oracle client library.
276
+
277
+ See {file:docs/ldap-auth-and-function-interposition.md this document} for more detail.
278
+
279
+ Fixed Issues
280
+ ------------
281
+
282
+ ### Support RubyInstaller2 for Windows
283
+
284
+ Fix for RubyInstaller2 for Windows as suggested [here](https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#dll-loading).
285
+
286
+ ### Fix for latest cygwin
287
+
288
+ Use Win32::Registry instead of Win32API to compile ruby-oci8 on the latest cygwin.
289
+
290
+ (contributed by tomasjura. [github issue #167](https://github.com/kubo/ruby-oci8/issues/167))
291
+
292
+ ### Removed too specific ruby version constraint in binary gems.
293
+
294
+ (contributed by davidbrs. [github issue #156](https://github.com/kubo/ruby-oci8/issues/156))
295
+
296
+ 2.2.3 (2016-12-27)
297
+ ==================
5
298
 
6
299
  New Features
7
300
  ------------
@@ -14,8 +307,8 @@ New Features
14
307
  - Suppress warnings outputted by Minitest in ruby 2.4.0
15
308
  - Suppress warnings when compiling with ruby 2.4.0
16
309
 
17
- 2.2.2
18
- =====
310
+ 2.2.2 (2016-04-24)
311
+ ==================
19
312
 
20
313
  New Features
21
314
  ------------
@@ -61,8 +354,8 @@ Other Changes
61
354
  - Check the default value of DYLD_FALLBACK_LIBRARY_PATH after checking OCI_DIR on installation. (OS X only)
62
355
 
63
356
 
64
- 2.2.1
65
- =====
357
+ 2.2.1 (2015-11-01)
358
+ ==================
66
359
 
67
360
  New Features
68
361
  ------------
@@ -90,16 +383,16 @@ Other Changes
90
383
 
91
384
  - Delete unused code which was added to support old Oracle and ruby 1.8.
92
385
 
93
- 2.2.0.2
94
- =======
386
+ 2.2.0.2 (2015-10-12)
387
+ ====================
95
388
 
96
389
  Nothing was changed except the version.
97
390
 
98
391
  The forth version was incremented to release binary gems for mingw32.
99
392
  The binary gems for 2.2.0.1 didn't work by faultily packaging.
100
393
 
101
- 2.2.0.1
102
- =======
394
+ 2.2.0.1 (2015-10-11)
395
+ ====================
103
396
 
104
397
  If ruby-oci8 2.2.0 is installed, you have no need to update it to
105
398
  2.2.0.1. Source code itself was not changed between 2.2.0 and 2.2.0.1.
@@ -115,8 +408,8 @@ Ruby-oci8 2.2.0 documents had not been generated in rubydoc.info
115
408
  though the URLs are displayed on installation failure. They were
116
409
  changed to documents generated by the latest github repository.
117
410
 
118
- 2.2.0
119
- =====
411
+ 2.2.0 (2015-10-04)
412
+ ==================
120
413
 
121
414
  ### Drop ruby 1.8 support
122
415
 
@@ -157,8 +450,8 @@ Other Changes
157
450
  - Add OCI8.charset_name2id and OCI8.charset_id2name.
158
451
  Mark OCI8#charset_name2id and OCI8#charset_id2name as deprecated.
159
452
 
160
- 2.1.8
161
- =====
453
+ 2.1.8 (2015-04-04)
454
+ ==================
162
455
 
163
456
  New Features
164
457
  ------------
@@ -218,8 +511,8 @@ Fixed Issues
218
511
  - Don't use SYM2ID on ruby 2.2.0 or later not to make symbols unGCable
219
512
  by [Symbol GC](http://www.infoq.com/news/2014/12/ruby-2.2.0-released).
220
513
 
221
- 2.1.7
222
- =====
514
+ 2.1.7 (2014-02-02)
515
+ ==================
223
516
 
224
517
  New Features
225
518
  ------------
@@ -231,8 +524,8 @@ Fixed Issues
231
524
 
232
525
  - Fix OCI8#describe_table to follow synonyms in a remote database.
233
526
 
234
- 2.1.6
235
- =====
527
+ 2.1.6 (2013-12-29)
528
+ ==================
236
529
 
237
530
  New Features
238
531
  ------------
@@ -272,8 +565,8 @@ Fixed Issues
272
565
  - fix SEGV when one connection is used by more than two threads and temporary
273
566
  lobs are freed by GC.
274
567
 
275
- 2.1.5
276
- =====
568
+ 2.1.5 (2013-03-09)
569
+ ==================
277
570
 
278
571
  New Features
279
572
  ------------
@@ -293,8 +586,8 @@ Fixed Issues
293
586
  instant client is 11.2.0.3 for Solaris x86 32-bit, the ruby
294
587
  version is 1.9.3 or upper and the ruby is compiled by gcc.
295
588
 
296
- 2.1.4
297
- =====
589
+ 2.1.4 (2013-01-06)
590
+ ==================
298
591
 
299
592
  New Features
300
593
  ------------
@@ -334,8 +627,8 @@ Fixed Issues
334
627
 
335
628
  (reported by Brian Henderson)
336
629
 
337
- 2.1.3
338
- =====
630
+ 2.1.3 (2012-11-11)
631
+ ==================
339
632
 
340
633
  New Features
341
634
  ------------
@@ -392,8 +685,8 @@ Fixed Issues
392
685
  - Fix #<NoMethodError: undefined method `timezone' for Time:Class>
393
686
  when ruby is less than 1.9.2 and an object type's time attribute is accessed.
394
687
 
395
- 2.1.2
396
- =====
688
+ 2.1.2 (2012-04-28)
689
+ ==================
397
690
 
398
691
  Specification changes
399
692
  ---------------------
@@ -414,8 +707,8 @@ Fixed Issues
414
707
 
415
708
  (reported by Yasuo Honda)
416
709
 
417
- 2.1.1
418
- =====
710
+ 2.1.1 (2012-04-22)
711
+ ==================
419
712
 
420
713
  New Features
421
714
  ------------
@@ -462,8 +755,8 @@ Fixed Issues
462
755
 
463
756
  (repored by Leoš Bitto)
464
757
 
465
- 2.1.0
466
- =====
758
+ 2.1.0 (2011-12-13)
759
+ ==================
467
760
 
468
761
  New Features
469
762
  ------------
@@ -578,8 +871,8 @@ Fixed Issues
578
871
 
579
872
  (reported by jbirdjavi)
580
873
 
581
- 2.0.6
582
- =====
874
+ 2.0.6 (2011-06-14)
875
+ ==================
583
876
 
584
877
  Fixed issues
585
878
  ------------
@@ -590,8 +883,8 @@ Fixed issues
590
883
  a closed OCI handle's method is called. It was chaned in 2.0.5
591
884
  by mistake.
592
885
 
593
- 2.0.5
594
- =====
886
+ 2.0.5 (2011-06-12)
887
+ ==================
595
888
 
596
889
  New Features
597
890
  ------------
@@ -679,8 +972,8 @@ Fixed issues
679
972
 
680
973
  (reported by Sebastian YEPES)
681
974
 
682
- 2.0.4
683
- =====
975
+ 2.0.4 (2010-02-28)
976
+ ==================
684
977
 
685
978
  New Features
686
979
  ------------
@@ -741,8 +1034,8 @@ Fixed issues
741
1034
 
742
1035
  (reported by Raimonds Simanovskis)
743
1036
 
744
- 2.0.3
745
- =====
1037
+ 2.0.3 (2009-10-21)
1038
+ ==================
746
1039
 
747
1040
  Incompatible Changes
748
1041
  --------------------
@@ -882,8 +1175,8 @@ Fixed installation issues
882
1175
 
883
1176
  (reported by Kazuya Teramoto)
884
1177
 
885
- 2.0.2
886
- =====
1178
+ 2.0.2 (2009-05-17)
1179
+ ==================
887
1180
 
888
1181
  * add new methods
889
1182
  - {OCI8#select_one}
@@ -923,8 +1216,8 @@ Fixed installation issues
923
1216
  * [ruby 1.9] fix to bind string data by the length got from String#bytesize
924
1217
  converted to {OCI8.encoding}, not by String#size.
925
1218
 
926
- 2.0.1
927
- =====
1219
+ 2.0.1 (2009-03-17)
1220
+ ==================
928
1221
 
929
1222
  * release a binary gem for Windows, which contains libraries for both
930
1223
  ruby 1.8 and ruby 1.9.1.
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
+ Ruby-oci8
2
+ =========
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/ruby-oci8.svg)](http://badge.fury.io/rb/ruby-oci8)
5
+ [![Tests](https://github.com/kubo/ruby-oci8/actions/workflows/tests.yml/badge.svg)](https://github.com/kubo/ruby-oci8/actions/workflows/tests.yml)
6
+
1
7
  What is ruby-oci8
2
- =================
8
+ -----------------
3
9
 
4
10
  Ruby-oci8 is a ruby interface for Oracle Database. The latest version
5
11
  is available for all Oracle versions after Oracle 10g including Oracle
@@ -11,24 +17,26 @@ Note that ruby 1.8 support was dropped in ruby-oci8 2.2.0.
11
17
  Use ruby-oci8 2.1.8 for ruby 1.8.
12
18
 
13
19
  What's new
14
- ==========
20
+ ----------
15
21
 
16
22
  See {file:NEWS}.
17
23
 
18
24
  Sample one-liner
19
- ================
25
+ ----------------
20
26
 
21
- Connect to scott/tiger, select `emp` and print as CSV format.
27
+ When you have an Oracle database server to which `sqlplus scott/tiger` can connect
28
+ and `scott` user has `emp` table, you can select `emp` and print rows
29
+ as CSV by the followig one liner.
22
30
 
23
31
  ruby -r oci8 -e "OCI8.new('scott', 'tiger').exec('select * from emp') do |r| puts r.join(','); end"
24
32
 
25
33
  Homepage
26
- ========
34
+ --------
27
35
 
28
36
  * http://www.rubydoc.info/github/kubo/ruby-oci8
29
37
 
30
38
  Installation
31
- ============
39
+ ------------
32
40
 
33
41
  * {file:docs/install-full-client.md Install for Oracle Full Client}
34
42
  * {file:docs/install-instant-client.md Install for Oracle Instant Client}
@@ -36,20 +44,23 @@ Installation
36
44
  * {file:docs/install-on-osx.md Install on OS X}
37
45
 
38
46
  Report issues
39
- =============
47
+ -------------
40
48
 
41
49
  * {file:docs/report-installation-issue.md Report Installation Issues}
42
50
  * [The issues page on github](https://github.com/kubo/ruby-oci8/issues)
43
51
 
44
52
  Other documents
45
- ===============
53
+ ---------------
46
54
 
55
+ * {file:docs/number-type-mapping.md Number Type Mapping between Oracle and Ruby}
47
56
  * {file:docs/timeout-parameters.md Timeout Parameters}
48
57
  * {file:docs/conflicts-local-connections-and-processes.md Conflicts between Local Connections and Child Process Handling on Unix}
58
+ * {file:docs/hanging-after-inactivity.md Hanging After a Long Period of Inactivity}
49
59
  * {file:docs/bind-array-to-in_cond.md Bind an Array to IN-condition}
60
+ * {file:docs/ldap-auth-and-function-interposition.md LDAP Authentication and Function Interposition}
50
61
 
51
62
  License
52
- =======
63
+ -------
53
64
 
54
65
  * {file:COPYING 2-clause BSD-style license} from ruby-oci8 2.1.3
55
66
  * {file:COPYING_old old Ruby license} until 2.1.2
data/dist-files CHANGED
@@ -11,12 +11,14 @@ pre-distclean.rb
11
11
  ruby-oci8.gemspec
12
12
  setup.rb
13
13
  docs/bind-array-to-in_cond.md
14
+ docs/conflicts-local-connections-and-processes.md
15
+ docs/hanging-after-inactivity.md
14
16
  docs/install-binary-package.md
15
17
  docs/install-full-client.md
16
18
  docs/install-instant-client.md
17
19
  docs/install-on-osx.md
18
- docs/conflicts-local-connections-and-processes.md
19
- docs/osx-install-dev-tools.png
20
+ docs/ldap-auth-and-function-interposition.md
21
+ docs/number-type-mapping.md
20
22
  docs/platform-specific-issues.md
21
23
  docs/report-installation-issue.md
22
24
  docs/timeout-parameters.md
@@ -77,16 +79,19 @@ lib/oci8/oracle_version.rb
77
79
  lib/oci8/properties.rb
78
80
  lib/oci8/version.rb
79
81
  lib/ruby-oci8.rb
80
- test/README
82
+ test/README.md
81
83
  test/config.rb
82
84
  test/setup_test_object.sql
85
+ test/setup_test_package.sql
83
86
  test/test_all.rb
84
87
  test/test_appinfo.rb
85
88
  test/test_array_dml.rb
86
89
  test/test_bind_array.rb
90
+ test/test_bind_boolean.rb
87
91
  test/test_bind_raw.rb
88
92
  test/test_bind_string.rb
89
93
  test/test_bind_time.rb
94
+ test/test_bind_integer.rb
90
95
  test/test_break.rb
91
96
  test/test_clob.rb
92
97
  test/test_connection_pool.rb
@@ -103,4 +108,5 @@ test/test_oracle_version.rb
103
108
  test/test_oradate.rb
104
109
  test/test_oranumber.rb
105
110
  test/test_package_type.rb
111
+ test/test_properties.rb
106
112
  test/test_rowid.rb
@@ -1,4 +1,4 @@
1
- @ Bind an Array to IN-condition
1
+ # @title Bind an Array to IN-condition
2
2
 
3
3
  Bind an Array to IN-condition
4
4
  =============================
@@ -27,7 +27,7 @@ The above code is rewritten as follows:
27
27
 
28
28
  ids = [ ... ] # an arbitrary-length array containing user IDs.
29
29
 
30
- in_cond = OCI8::in_cond(:id, ids)]
30
+ in_cond = OCI8::in_cond(:id, ids)
31
31
  cursor = conn.exec("select * from users where id in (#{in_cond.names})", *in_cond.values)
32
32
 
33
33
  or
@@ -1,7 +1,10 @@
1
1
  # @title Conflicts between Local Connections and Child Process Handling on Unix
2
2
 
3
+ Conflicts between Local Connections and Child Process Handling on Unix
4
+ ======================================================================
5
+
3
6
  Background
4
- ==========
7
+ ----------
5
8
 
6
9
  When a local (not-TCP) Oracle connection is established on Unix,
7
10
  Oracle client library changes signal handlers in the process to reap
@@ -9,7 +12,7 @@ all dead child processes. However it conflicts with child process
9
12
  handling in ruby.
10
13
 
11
14
  Problem 1: It trashes child process handling of Open3::popen.
12
- ==========
15
+ ----------
13
16
 
14
17
  require 'oci8'
15
18
  require 'open3'
@@ -35,7 +38,7 @@ The above code outputs the following result:
35
38
  the child process on the process termination before ruby detects it.
36
39
 
37
40
  Problem 2: It creates defunct processes after disconnection if signal handlers are reset.
38
- ==========
41
+ ----------
39
42
 
40
43
  The `system` function overwrites signal handlers.
41
44
  It fixes the problem 1 as follows.
@@ -80,7 +83,7 @@ If a program repeatedly creates a local connection and disconnects it,
80
83
  the number of defunct processes increases gradually.
81
84
 
82
85
  Solution: BEQUEATH_DETACH=YES
83
- ==========
86
+ ----------
84
87
 
85
88
  By setting [BEQUEATH_DETACH=YES][] in `sqlnet.ora`, Oracle client library
86
89
  doesn't change signal handlers. The above two problems are fixed.