ruby-oci8 2.1.5.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +17 -0
- data/COPYING +30 -0
- data/COPYING_old +64 -0
- data/ChangeLog +2779 -0
- data/Makefile +92 -0
- data/NEWS +660 -0
- data/README.md +43 -0
- data/VERSION +1 -0
- data/dist-files +91 -0
- data/docs/install-binary-package.md +40 -0
- data/docs/install-full-client.md +116 -0
- data/docs/install-instant-client.md +167 -0
- data/docs/platform-specific-issues.md +197 -0
- data/docs/report-installation-issue.md +50 -0
- data/lib/.document +1 -0
- data/lib/dbd/OCI8.rb +591 -0
- data/lib/oci8.rb +147 -0
- data/lib/oci8.rb.in +147 -0
- data/lib/oci8/.document +8 -0
- data/lib/oci8/bindtype.rb +350 -0
- data/lib/oci8/compat.rb +113 -0
- data/lib/oci8/connection_pool.rb +108 -0
- data/lib/oci8/cursor.rb +564 -0
- data/lib/oci8/datetime.rb +605 -0
- data/lib/oci8/encoding-init.rb +79 -0
- data/lib/oci8/encoding.yml +537 -0
- data/lib/oci8/metadata.rb +2092 -0
- data/lib/oci8/object.rb +605 -0
- data/lib/oci8/oci8.rb +560 -0
- data/lib/oci8/ocihandle.rb +607 -0
- data/lib/oci8/oracle_version.rb +143 -0
- data/lib/oci8/properties.rb +134 -0
- data/lib/oci8lib_200.so +0 -0
- data/metaconfig +142 -0
- data/pre-distclean.rb +7 -0
- data/ruby-oci8.gemspec +80 -0
- data/setup.rb +1333 -0
- data/test/README +42 -0
- data/test/config.rb +184 -0
- data/test/setup_test_object.sql +171 -0
- data/test/test_all.rb +54 -0
- data/test/test_appinfo.rb +63 -0
- data/test/test_array_dml.rb +333 -0
- data/test/test_bind_raw.rb +46 -0
- data/test/test_bind_string.rb +106 -0
- data/test/test_bind_time.rb +178 -0
- data/test/test_break.rb +124 -0
- data/test/test_clob.rb +98 -0
- data/test/test_connection_pool.rb +125 -0
- data/test/test_connstr.rb +81 -0
- data/test/test_datetime.rb +581 -0
- data/test/test_dbi.rb +366 -0
- data/test/test_dbi_clob.rb +53 -0
- data/test/test_encoding.rb +104 -0
- data/test/test_error.rb +88 -0
- data/test/test_metadata.rb +1485 -0
- data/test/test_object.rb +462 -0
- data/test/test_oci8.rb +489 -0
- data/test/test_oracle_version.rb +70 -0
- data/test/test_oradate.rb +256 -0
- data/test/test_oranumber.rb +787 -0
- data/test/test_rowid.rb +33 -0
- metadata +109 -0
data/Makefile
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
VERSION = `cat VERSION`
|
2
|
+
RUBY = ruby -w
|
3
|
+
|
4
|
+
all: build
|
5
|
+
|
6
|
+
config.save: lib/oci8.rb.in
|
7
|
+
$(RUBY) setup.rb config
|
8
|
+
|
9
|
+
build: config.save
|
10
|
+
$(RUBY) setup.rb setup
|
11
|
+
|
12
|
+
check: build
|
13
|
+
$(RUBY) setup.rb test
|
14
|
+
|
15
|
+
clean:
|
16
|
+
$(RUBY) setup.rb clean
|
17
|
+
|
18
|
+
distclean:
|
19
|
+
$(RUBY) setup.rb distclean
|
20
|
+
|
21
|
+
install:
|
22
|
+
$(RUBY) setup.rb install
|
23
|
+
|
24
|
+
site-install:
|
25
|
+
$(RUBY) setup.rb install
|
26
|
+
|
27
|
+
format_c_source:
|
28
|
+
astyle --options=none --style=linux --indent=spaces=4 --brackets=linux --suffix=none ext/oci8/*.[ch]
|
29
|
+
|
30
|
+
# internal use only
|
31
|
+
.PHONY: dist dist-check doc copy-doc
|
32
|
+
|
33
|
+
doc:
|
34
|
+
rm -rf doc
|
35
|
+
TZ= yard
|
36
|
+
echo DirectoryIndex frames.html > doc/.htaccess
|
37
|
+
|
38
|
+
copy-doc: doc
|
39
|
+
rsync -avz doc/ rubyforge.org:/var/www/gforge-projects/ruby-oci8/en
|
40
|
+
|
41
|
+
dist:
|
42
|
+
-rm -rf ruby-oci8-$(VERSION)
|
43
|
+
mkdir ruby-oci8-$(VERSION)
|
44
|
+
tar cf - `cat dist-files` | (cd ruby-oci8-$(VERSION); tar xf - )
|
45
|
+
tar cfz ruby-oci8-$(VERSION).tar.gz ruby-oci8-$(VERSION)
|
46
|
+
|
47
|
+
dist-check: dist
|
48
|
+
cd ruby-oci8-$(VERSION) && $(MAKE) RUBY="$(RUBY)"
|
49
|
+
cd ruby-oci8-$(VERSION) && $(MAKE) RUBY="$(RUBY)" check
|
50
|
+
cd ruby-oci8-$(VERSION)/src && $(MAKE) RUBY="$(RUBY)" sitearchdir=../work sitelibdir=../work site-install
|
51
|
+
cd ruby-oci8-$(VERSION)/test && $(RUBY) -I../work -I../support test_all.rb
|
52
|
+
|
53
|
+
#
|
54
|
+
# for Windows
|
55
|
+
#
|
56
|
+
RUBY_18 = c:\ruby
|
57
|
+
RUBY_191 = c:\ruby-1.9.1
|
58
|
+
GEMPKG = ruby-oci8-2.0.3-x86-mswin32-60.gem
|
59
|
+
|
60
|
+
ext\oci8\oci8lib_18.so:
|
61
|
+
$(RUBY_18)\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby18')"
|
62
|
+
md ruby18
|
63
|
+
cd ruby18
|
64
|
+
$(RUBY_18)\bin\ruby ..\setup.rb config -- --with-runtime-check
|
65
|
+
$(RUBY_18)\bin\ruby ..\setup.rb setup
|
66
|
+
rem $(RUBY_18)\bin\ruby ..\setup.rb test
|
67
|
+
cd ..
|
68
|
+
copy ruby18\ext\oci8\oci8lib_18.so ext\oci8\oci8lib_18.so
|
69
|
+
|
70
|
+
ext\oci8\oci8lib_191.so:
|
71
|
+
$(RUBY_191)\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby191')"
|
72
|
+
md ruby191
|
73
|
+
cd ruby191
|
74
|
+
$(RUBY_191)\bin\ruby ..\setup.rb config -- --with-runtime-check
|
75
|
+
$(RUBY_191)\bin\ruby ..\setup.rb setup
|
76
|
+
rem $(RUBY_191)\bin\ruby ..\setup.rb test
|
77
|
+
cd ..
|
78
|
+
copy ruby191\ext\oci8\oci8lib_191.so ext\oci8\oci8lib_191.so
|
79
|
+
copy ruby191\lib\oci8.rb lib\oci8.rb
|
80
|
+
|
81
|
+
$(GEMPKG): ext\oci8\oci8lib_18.so ext\oci8\oci8lib_191.so ruby-oci8.gemspec
|
82
|
+
$(RUBY_191)\bin\gem build ruby-oci8.gemspec -- current
|
83
|
+
|
84
|
+
test-win32-ruby18: $(GEMPKG)
|
85
|
+
$(RUBY_18)\bin\gem install $(GEMPKG) --no-rdoc --no-ri --local
|
86
|
+
$(RUBY_18)\bin\ruby -rubygems test\test_all.rb
|
87
|
+
|
88
|
+
test-win32-ruby191: $(GEMPKG)
|
89
|
+
$(RUBY_191)\bin\gem install $(GEMPKG) --no-rdoc --no-ri --local
|
90
|
+
$(RUBY_191)\bin\ruby test\test_all.rb
|
91
|
+
|
92
|
+
test-win32: test-win32-ruby18 test-win32-ruby191
|
data/NEWS
ADDED
@@ -0,0 +1,660 @@
|
|
1
|
+
# @markup markdown
|
2
|
+
|
3
|
+
2.1.5
|
4
|
+
=====
|
5
|
+
|
6
|
+
New Features
|
7
|
+
------------
|
8
|
+
|
9
|
+
### V$SESSION_CONNECT_INFO.CLIENT_DRIVER.
|
10
|
+
|
11
|
+
'rubyoci8' is set as the driver name, which is displayed in
|
12
|
+
V$SESSION_CONNECT_INFO.CLIENT_DRIVER when both the client and
|
13
|
+
the server are Oracle 11g or upper.
|
14
|
+
|
15
|
+
Fixed Issues
|
16
|
+
------------
|
17
|
+
|
18
|
+
- fix segmentation fault when the process exits on rubinius.
|
19
|
+
|
20
|
+
- fix "OCI Library Initialization Error" only when the Oracle
|
21
|
+
instant client is 11.2.0.3 for Solaris x86 32-bit, the ruby
|
22
|
+
version is 1.9.3 or upper and the ruby is compiled by gcc.
|
23
|
+
|
24
|
+
2.1.4
|
25
|
+
=====
|
26
|
+
|
27
|
+
New Features
|
28
|
+
------------
|
29
|
+
|
30
|
+
### Fast Application Notification (FAN) support
|
31
|
+
|
32
|
+
Look at {http://php.net/manual/en/oci8.connection.php} to know what is FAN.
|
33
|
+
[oci8.events](http://php.net/manual/en/oci8.configuration.php#ini.oci8.events) in PHP
|
34
|
+
corresponds to {OCI8.properties OCI8.properties[:events_mode]} in ruby-oci8.
|
35
|
+
|
36
|
+
Note: You need to set `OCI8.properties[:events_mode]` after `"require 'oci8'"` and before
|
37
|
+
any methods which call Oracle OCI functions.
|
38
|
+
|
39
|
+
Fixed Issues
|
40
|
+
------------
|
41
|
+
|
42
|
+
- fix SEGV when a temporary LOB is freed when `OCILobRead` returns `OCI_NEED_DATA`.
|
43
|
+
See: [github issue #20](https://github.com/kubo/ruby-oci8/issues/20)
|
44
|
+
|
45
|
+
(reported by Edgars Beigarts)
|
46
|
+
|
47
|
+
- use `RUBY_VERSION` instead of `RbConfig::CONFIG['ruby_version']` to know the
|
48
|
+
ruby ABI version. The latter may be changed by the configure option
|
49
|
+
--with-ruby-version.
|
50
|
+
See: [github issue #24](https://github.com/kubo/ruby-oci8/issues/24)
|
51
|
+
|
52
|
+
(reported by suhrawardi)
|
53
|
+
|
54
|
+
- add a script encoding magic comment for ruby 2.0.0 preview2.
|
55
|
+
See: [github issue #25](https://github.com/kubo/ruby-oci8/issues/25)
|
56
|
+
|
57
|
+
(reported by aboltart)
|
58
|
+
|
59
|
+
- fix {OCI8#describe_table} not to follow synonyms until stack overflow.
|
60
|
+
Now the recursive level is limited to 20.
|
61
|
+
See: [github issue #26](https://github.com/kubo/ruby-oci8/issues/26)
|
62
|
+
|
63
|
+
(reported by Brian Henderson)
|
64
|
+
|
65
|
+
2.1.3
|
66
|
+
=====
|
67
|
+
|
68
|
+
New Features
|
69
|
+
------------
|
70
|
+
|
71
|
+
### {OCI8::Cursor#statement}
|
72
|
+
|
73
|
+
It returns the text of the SQL statement prepared in the cursor.
|
74
|
+
|
75
|
+
cursor = conn.parse("select * from country where country_code = 'ja'")
|
76
|
+
cursor.statement # => "select * from country where country_code = 'ja'"
|
77
|
+
|
78
|
+
See: [github issue #16](https://github.com/kubo/ruby-oci8/issues/16)
|
79
|
+
|
80
|
+
Specification changes
|
81
|
+
---------------------
|
82
|
+
|
83
|
+
### License was changed to 2-clause BSD-style license.
|
84
|
+
|
85
|
+
The former license was same with old ruby (<= 1.9.2) license.
|
86
|
+
|
87
|
+
### Oracle object type's DATE field type
|
88
|
+
|
89
|
+
Ruby-oci8 had returned a DateTime object when Oracle object type's DATE
|
90
|
+
field type was accessed. Now it returns a Time object.
|
91
|
+
|
92
|
+
Fixed Issues
|
93
|
+
------------
|
94
|
+
|
95
|
+
- Fix to work with procedures and functions that return temporary lobs.
|
96
|
+
See: [github issue #13](https://github.com/kubo/ruby-oci8/issues/13)
|
97
|
+
|
98
|
+
(contributed by timon)
|
99
|
+
|
100
|
+
- Fix Oracle object type's DATE field tests.
|
101
|
+
See: [github issue #17](https://github.com/kubo/ruby-oci8/issues/17)
|
102
|
+
|
103
|
+
(reported by Yasuo Honda)
|
104
|
+
|
105
|
+
- Fix a sequence test failure on Oracle 11gR2.
|
106
|
+
See: [github issue #18](https://github.com/kubo/ruby-oci8/issues/18)
|
107
|
+
|
108
|
+
(reported by Yasuo Honda)
|
109
|
+
|
110
|
+
- Include COPYING files.
|
111
|
+
See: [github issue #19](https://github.com/kubo/ruby-oci8/issues/19)
|
112
|
+
|
113
|
+
(requested by Johannes Weberhofer)
|
114
|
+
|
115
|
+
- Fix SEGV when a temporary LOB is GCed while another LOB is read.
|
116
|
+
See: [github issue #20](https://github.com/kubo/ruby-oci8/issues/20)
|
117
|
+
|
118
|
+
(reported by techsplicer)
|
119
|
+
|
120
|
+
- Fix #<NoMethodError: undefined method `timezone' for Time:Class>
|
121
|
+
when ruby is less than 1.9.2 and an object type's time attribute is accessed.
|
122
|
+
|
123
|
+
2.1.2
|
124
|
+
=====
|
125
|
+
|
126
|
+
Specification changes
|
127
|
+
---------------------
|
128
|
+
|
129
|
+
### Statement caching in OCI is disabled by default.
|
130
|
+
|
131
|
+
This is workaround about a SIGSEGV issue.
|
132
|
+
See: [oracle enhanced issue #162](https://github.com/rsim/oracle-enhanced/issues/162)
|
133
|
+
|
134
|
+
Fixed Issues
|
135
|
+
------------
|
136
|
+
|
137
|
+
- delete code which overwrites signal handlers registered by ruby.
|
138
|
+
See: [rubyforge thread 50690](http://rubyforge.org/forum/forum.php?thread_id=50690&forum_id=1078)
|
139
|
+
|
140
|
+
- fix internal heap error in OCI.
|
141
|
+
See: [github issue #12](https://github.com/kubo/ruby-oci8/issues/12)
|
142
|
+
|
143
|
+
(reported by Yasuo Honda)
|
144
|
+
|
145
|
+
2.1.1
|
146
|
+
=====
|
147
|
+
|
148
|
+
New Features
|
149
|
+
------------
|
150
|
+
|
151
|
+
### Statement caching in OCI
|
152
|
+
|
153
|
+
See {http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#i471377}.
|
154
|
+
This feature is enabled only when the Oracle client is 9iR2 or upper.
|
155
|
+
|
156
|
+
The default cache size is 20. It can be changed as follows.
|
157
|
+
|
158
|
+
# change the size to 100.
|
159
|
+
OCI8.properties[:statement_cache_size] = 100
|
160
|
+
|
161
|
+
Note: The default size was changed to zero in 2.1.2.
|
162
|
+
|
163
|
+
Specification changes
|
164
|
+
---------------------
|
165
|
+
|
166
|
+
### OCI8::LOB#read() returns an empty string '' when it is an empty lob.
|
167
|
+
|
168
|
+
It had been returned nil.
|
169
|
+
|
170
|
+
Fixed Issues
|
171
|
+
------------
|
172
|
+
|
173
|
+
- OCI8::CLOB.new(conn, '') works now.
|
174
|
+
|
175
|
+
- fix core dump when calling PL/SQL procedure with cursor argument.
|
176
|
+
See: {https://github.com/kubo/ruby-oci8/issues/11}
|
177
|
+
|
178
|
+
(reported by Raimonds Simanovskis)
|
179
|
+
|
180
|
+
- fix testcase failures in DST.
|
181
|
+
See: {https://github.com/kubo/ruby-oci8/issues/8}
|
182
|
+
|
183
|
+
(reported by Yasuo Honda)
|
184
|
+
|
185
|
+
- fix a compilation issue on Redhat.
|
186
|
+
|
187
|
+
(reported by John Beckwith and others)
|
188
|
+
|
189
|
+
- fix "wrong number of arguments (1 for 2)" when a date member in a object type is accessed.
|
190
|
+
|
191
|
+
(repored by Leoš Bitto)
|
192
|
+
|
193
|
+
2.1.0
|
194
|
+
=====
|
195
|
+
|
196
|
+
New Features
|
197
|
+
------------
|
198
|
+
|
199
|
+
### OCI connection pooling
|
200
|
+
|
201
|
+
See: {OCI8::ConnectionPool}
|
202
|
+
|
203
|
+
### Daylight saving time aware if TZ is set.
|
204
|
+
|
205
|
+
You should set the environment variable TZ if your applications run
|
206
|
+
in a time zone with daylight saving time transitions.
|
207
|
+
Otherwise, Oracle session time zone is set with current constant
|
208
|
+
offset from GMT.
|
209
|
+
(reported by Yasuo Honda)
|
210
|
+
|
211
|
+
### connect as sysasm (Oracle 11g only)
|
212
|
+
|
213
|
+
You can connect to the Oracle server as SYSASM privilege as follows:
|
214
|
+
|
215
|
+
OCI8.new('username/password as sysasm')
|
216
|
+
|
217
|
+
or
|
218
|
+
|
219
|
+
OCI8.new('username', 'password', nil, :SYSASM)
|
220
|
+
|
221
|
+
### Oracle number is converted to ruby float exactly same as ruby does.
|
222
|
+
|
223
|
+
From ruby 1.9.2, a float value converted from Oracle number 15.7 by
|
224
|
+
the Oracle function OCINumberToReal() makes a string representation
|
225
|
+
15.700000000000001 by `Float#to_s`. (See: {http://redmine.ruby-lang.org/issues/4656})
|
226
|
+
To avoid this issue, any Oracle number is converted to a float as
|
227
|
+
ruby's `String#to_f` does.
|
228
|
+
|
229
|
+
The behavior is customizable by {OCI8.properties OCI8.properties[:float\_conversion\_type]}.
|
230
|
+
|
231
|
+
OCI8.properties[:float_conversion_type] = :oracle # => Use OCINumberToReal()
|
232
|
+
OCI8.properties[:float_conversion_type] = :ruby # => Use String#to_f
|
233
|
+
|
234
|
+
The default value is :ruby.
|
235
|
+
|
236
|
+
### `OCISuccessWithInfo` exceptions are not raised any more.
|
237
|
+
|
238
|
+
Ruby-oci8 2.0 treats `OCI_SUCCESS_WITH_INFO` in OCI layer as an error
|
239
|
+
and raise an exception {OCISuccessWithInfo} such as "ORA-24347: Warning of
|
240
|
+
a NULL column in an aggregate function" and "ORA-28002: the password will
|
241
|
+
expire within xx days."
|
242
|
+
|
243
|
+
From 2.1.0, it is treated as a warning and the exception is set
|
244
|
+
to {OCI8#last_error}.
|
245
|
+
|
246
|
+
### {OCI8#last_error} is added.
|
247
|
+
|
248
|
+
The last error or warning associated with the session is set to
|
249
|
+
{OCI8#last_error}. The usecase is to detect {OCISuccessWithInfo}.
|
250
|
+
It is reset by {OCI8#exec} and {OCI8#parse}.
|
251
|
+
|
252
|
+
### Experimental support of character length semantics
|
253
|
+
|
254
|
+
{OCI8.properties OCI8.properties[:length\_semantics]} indicates length semantics
|
255
|
+
of {OCI8::Cursor#bind\_param}. When it is `:char`, the length is counted by the
|
256
|
+
number of characters. When it is `:byte`, it is counted by the number of
|
257
|
+
bytes.
|
258
|
+
|
259
|
+
### {OCI8.client\_charset\_name} and {OCI8#database\_charset\_name} are added.
|
260
|
+
|
261
|
+
They return Oracle charset name such as WE8ISO8859P15.
|
262
|
+
|
263
|
+
Specification changes
|
264
|
+
---------------------
|
265
|
+
|
266
|
+
### The parent class {OCINoData} was changed from {OCIException} to {OCIError}.
|
267
|
+
|
268
|
+
### Oracle 8 and Oracie 8i is not supported anymore.
|
269
|
+
|
270
|
+
Fixed Issues
|
271
|
+
------------
|
272
|
+
|
273
|
+
- Fix a bug that an array is always bound as null.
|
274
|
+
This bug was introduced in ruby-oci8 2.0.5.
|
275
|
+
|
276
|
+
(reported by Leoš Bitto)
|
277
|
+
|
278
|
+
- Avoid a gcc internal compiler error when using ruby1.9.2-p290 on
|
279
|
+
ubuntu 11.10 (64bit).
|
280
|
+
|
281
|
+
(reported by Bob Saveland.)
|
282
|
+
|
283
|
+
- Fix compilation problems on Solaris.
|
284
|
+
|
285
|
+
(Reported by Sanjiv Patel.)
|
286
|
+
|
287
|
+
- Fix compilation problems on Linux.
|
288
|
+
|
289
|
+
(Reported by Edgars Beigarts.)
|
290
|
+
|
291
|
+
- Connections are released by GC without explicit logoff.
|
292
|
+
|
293
|
+
- Set ruby encoding CP950 for oracle characterset ZHT16MSWIN950 and
|
294
|
+
CP951 for ZHT16HKSCS and ZHT16HKSCS31 when the ruby is 1.9.3.
|
295
|
+
|
296
|
+
- Clear an executuing thread information in a connection when a SQL
|
297
|
+
executions is canceled by Thread#kill or Timeout::timeout.
|
298
|
+
|
299
|
+
(reported by Aaron Qian)
|
300
|
+
|
301
|
+
- Fix some test cases for object type and TZ issues.
|
302
|
+
|
303
|
+
(reported by Yasuo Honda)
|
304
|
+
|
305
|
+
- Use Gem::Command.build_args to get arguments after '--'.
|
306
|
+
|
307
|
+
(reported by jbirdjavi)
|
308
|
+
|
309
|
+
2.0.6
|
310
|
+
=====
|
311
|
+
|
312
|
+
Fixed issues
|
313
|
+
------------
|
314
|
+
|
315
|
+
- fix SEGV when freeing a temporary LOB during GC on rubinius 1.2.3.
|
316
|
+
|
317
|
+
- revert the exception type from RuntimeError to OCIException when
|
318
|
+
a closed OCI handle's method is called. It was chaned in 2.0.5
|
319
|
+
by mistake.
|
320
|
+
|
321
|
+
2.0.5
|
322
|
+
=====
|
323
|
+
|
324
|
+
New Features
|
325
|
+
------------
|
326
|
+
|
327
|
+
### Support Rubinius.
|
328
|
+
|
329
|
+
### {OraNumber#has\_decimal\_part?} is added.
|
330
|
+
|
331
|
+
Example:
|
332
|
+
|
333
|
+
OraNumber(10).has_decimal_part? # => false
|
334
|
+
OraNumber(10.1).has_decimal_part? # => true
|
335
|
+
|
336
|
+
### Limitted support for OraNumber's positive and negative infinity.
|
337
|
+
|
338
|
+
They are converted to '~' and '-~' respectively as described in
|
339
|
+
{http://www.ixora.com.au/notes/infinity.htm}.
|
340
|
+
|
341
|
+
### {OCI8.properties} is added to control ruby-oci8 behaviour.
|
342
|
+
|
343
|
+
It supports :bind_string_as_nchar only for now.
|
344
|
+
|
345
|
+
### {OCI8.properties}[:bind\_string\_as\_nchar] is added.
|
346
|
+
|
347
|
+
You need to set "`OCI8.properties[:bind_string_as_nchar] = true`"
|
348
|
+
if the database character set is not UTF-8 and 'NCHAR'/'NVARCHAR2' columns
|
349
|
+
contain characters which cannot be converted to the database character set.
|
350
|
+
|
351
|
+
See: {http://rubyforge.org/forum/forum.php?thread\_id=48838&forum\_id=1078}
|
352
|
+
|
353
|
+
Fixed issues
|
354
|
+
------------
|
355
|
+
|
356
|
+
- Fix InvalidHandle errors on Rails.
|
357
|
+
|
358
|
+
(reported by Jordan Curzon and Aaron Qian)
|
359
|
+
|
360
|
+
See: {http://rubyforge.org/forum/forum.php?thread\_id=49751&forum\_id=1078}
|
361
|
+
|
362
|
+
- Raise "OCIError: ORA-01805: possible error in date/time operation"
|
363
|
+
when Oracle 11gR2's client and server timezone versions are not same
|
364
|
+
instead of raising a exception "undefined method `*' for nil:NilClass."
|
365
|
+
|
366
|
+
See: {http://rubyforge.org/forum/forum.php?thread\_id=49102&forum\_id=1078}
|
367
|
+
|
368
|
+
- Fix unexpectedly disconnect when failed-logon connections is GC'ed
|
369
|
+
and the connection object's address is accidentally same with
|
370
|
+
an alive connection.
|
371
|
+
|
372
|
+
- Fix segmentation fault when calling {OCI8::Cursor#[]} for
|
373
|
+
closed statement objects.
|
374
|
+
|
375
|
+
(reported by Hugo L. Borges)
|
376
|
+
|
377
|
+
- Fix a bug that a string is bound to RAW.
|
378
|
+
Its encoding had been convertd to {OCI8.encoding} incorrectly.
|
379
|
+
|
380
|
+
- Fix memory leaks when temporary lobs are used.
|
381
|
+
|
382
|
+
- Fix a problem to assign 'NULL' bind value to object type bind variables.
|
383
|
+
|
384
|
+
(reported by Raimonds Simanovskis)
|
385
|
+
|
386
|
+
- Support LOB datatypes in object type.
|
387
|
+
|
388
|
+
(reported by Michael Sexton)
|
389
|
+
|
390
|
+
- Fix to compile on cygwin. The declaration of 'boolean' in Oracle
|
391
|
+
conflicts with that of latest cygwin.
|
392
|
+
|
393
|
+
(reported by Don Hill).
|
394
|
+
|
395
|
+
- Fix to complie for the 32-bit ruby which was compiled on x86\_64 linux
|
396
|
+
and configured without '--build', '--host' nor '--target'.
|
397
|
+
The 'RUBY_PLATFORM' is 'x86_64-linux' even though the ruby is 32-bit.
|
398
|
+
|
399
|
+
(reported by Jason Renschler)
|
400
|
+
|
401
|
+
- Fix wrong dependencies in Makefile when running 'make -jNNN (where NNN >= 2)'
|
402
|
+
|
403
|
+
(contributed by Alyano Alyanos. See bug #28129 on rubyforge.)
|
404
|
+
|
405
|
+
- Fix to compile on HP-UX. Duplicated const qualifiers prevented HP-UX cc
|
406
|
+
from compiling.
|
407
|
+
|
408
|
+
(reported by Sebastian YEPES)
|
409
|
+
|
410
|
+
2.0.4
|
411
|
+
=====
|
412
|
+
|
413
|
+
New Features
|
414
|
+
------------
|
415
|
+
|
416
|
+
### {OCI8.error_message} is added.
|
417
|
+
|
418
|
+
Gets the Oracle error message specified by message id.
|
419
|
+
Its language depends on 'NLS_LANGUAGE'.
|
420
|
+
|
421
|
+
Note: This method is unavailable if the Oracle client version is 8.0.
|
422
|
+
|
423
|
+
# When NLS_LANG is AMERICAN_AMERICA.AL32UTF8
|
424
|
+
OCI8.error_message(1)
|
425
|
+
# => "ORA-00001: unique constraint (%s.%s) violated"
|
426
|
+
|
427
|
+
# When NLS_LANG is FRENCH_FRANCE.AL32UTF8
|
428
|
+
OCI8.error_message(1)
|
429
|
+
# => "ORA-00001: violation de contrainte unique (%s.%s)"
|
430
|
+
|
431
|
+
### {OraNumber#dump} is added.
|
432
|
+
|
433
|
+
Returns {OraNumber}'s internal representation whose format
|
434
|
+
is same with the return value of Oracle SQL function DUMP().
|
435
|
+
|
436
|
+
OraNumber.new(100).dump #=> "Typ=2 Len=2: 194,2"
|
437
|
+
OraNumber.new(123).dump #=> "Typ=2 Len=3: 194,2,24"
|
438
|
+
OraNumber.new(0.1).dump #=> "Typ=2 Len=2: 192,11"
|
439
|
+
|
440
|
+
Fixed issues
|
441
|
+
------------
|
442
|
+
|
443
|
+
- Fractional second part is lost when ruby's Time instance is bound
|
444
|
+
to Oracle datatype TIMESTAMP.
|
445
|
+
|
446
|
+
(reported by Raimonds Simanovskis)
|
447
|
+
|
448
|
+
- {OraNumber#to\_i} and {OraNumber#to\_s} fail when its scale is larger
|
449
|
+
than 38.
|
450
|
+
|
451
|
+
(reported by Raimonds Simanovskis)
|
452
|
+
|
453
|
+
- Memory leak about 30 bytes per one place holder for object type.
|
454
|
+
|
455
|
+
- Segmentation fault when a collection of string is bound.
|
456
|
+
|
457
|
+
(reported by Raimonds Simanovskis)
|
458
|
+
|
459
|
+
- Segmentation fault when GC starts while initializing a bind
|
460
|
+
object for object type.
|
461
|
+
|
462
|
+
(reported by Remi Gagnon)
|
463
|
+
|
464
|
+
- Segmentation fault when OCI8::Cursor#fetch is called prior to
|
465
|
+
{OCI8::Cursor#exec}.
|
466
|
+
|
467
|
+
- Detailed error message is not reported when 'PL/SQL NO_DATA_FOUND'
|
468
|
+
exception is raised.
|
469
|
+
|
470
|
+
(reported by Raimonds Simanovskis)
|
471
|
+
|
472
|
+
2.0.3
|
473
|
+
=====
|
474
|
+
|
475
|
+
Incompatible Changes
|
476
|
+
--------------------
|
477
|
+
|
478
|
+
### Number column in a SQL statement
|
479
|
+
|
480
|
+
Changes the default data type for number column which fit neither
|
481
|
+
Integer nor Float from {OraNumber} to BigDecimal.
|
482
|
+
|
483
|
+
conn.exec("select 1.0 from dual") do |row|
|
484
|
+
p row[0] # => BigDecimal("1") if the ruby-oci8 version is 2.0.3.
|
485
|
+
# => OraNumber(1) if the version is 2.0.2.
|
486
|
+
end
|
487
|
+
|
488
|
+
### Priority of OraNumber within numerical types
|
489
|
+
|
490
|
+
The return types of basic arithmetic operations with other numerical
|
491
|
+
types are changed.
|
492
|
+
|
493
|
+
2.0.3:
|
494
|
+
|
495
|
+
OraNumber + Integer => OraNumber (OraNumber wins.)
|
496
|
+
OraNumber + Float => Float (OraNumber loses.)
|
497
|
+
OraNumber + Rational => Rational (OraNumber loses.)
|
498
|
+
OraNumber + BigDecimal => BigDecimal (OraNumber loses.)
|
499
|
+
|
500
|
+
2.0.2:
|
501
|
+
|
502
|
+
OraNumber + Integer => OraNumber (OraNumber wins always.)
|
503
|
+
OraNumber + Float => OraNumber
|
504
|
+
OraNumber + Rational => OraNumber
|
505
|
+
OraNumber + BigDecimal => OraNumber
|
506
|
+
|
507
|
+
### Interval day to second
|
508
|
+
|
509
|
+
The retrived value of Oracle data type "interval day to second"
|
510
|
+
was changed from the number of days as a Rational to the number
|
511
|
+
of seconds as a Float by default.
|
512
|
+
Use 'OCI8::BindType::IntervalDS.unit = :day' to make it compatible
|
513
|
+
with the previous versions.
|
514
|
+
|
515
|
+
conn.exec("select to_dsinterval('0 00:00:01') from dual") do |row|
|
516
|
+
p row[0] # => 1.0 if the version is 2.0.3 and
|
517
|
+
# OCI8::BindType::IntervalDS.unit is :second.
|
518
|
+
# => (1/86400) if the version is 2.0.3 and
|
519
|
+
# OCI8::BindType::IntervalDS.unit is :day or
|
520
|
+
# the version is 2.0.2.
|
521
|
+
end
|
522
|
+
|
523
|
+
### Date, timestamp, timestamp with time zone data types and ruby 1.9.2
|
524
|
+
|
525
|
+
These data types are retrived always as Time values when the
|
526
|
+
ruby version is 1.9.2 because the Time class is enhanced to
|
527
|
+
represent any time zone and is free from year 2038 problem.
|
528
|
+
|
529
|
+
Prior to ruby 1.9.2, if the time cannot be represented by
|
530
|
+
Unix time or the time zone is neither utc nor local, they are
|
531
|
+
retrived as DateTime values.
|
532
|
+
|
533
|
+
### Non-blocking mode and ruby 1.9
|
534
|
+
|
535
|
+
Non-blocking mode is enabled by default when the ruby is 1.9.
|
536
|
+
|
537
|
+
New Features
|
538
|
+
------------
|
539
|
+
|
540
|
+
### BigDecimal and Rational are availabe as bind values.
|
541
|
+
|
542
|
+
### New methods {OCI8#module=}, {OCI8#action=} and {OCI8#client_info=} are added.
|
543
|
+
|
544
|
+
These methods change the module name, the action name and the client_info
|
545
|
+
in the current session respectively.
|
546
|
+
|
547
|
+
After Oracle 10g client, these don't perform network round trips.
|
548
|
+
The change is reflected to the server by the next round trip such as
|
549
|
+
{OCI8#exec}, {OCI8#ping}, etc.
|
550
|
+
|
551
|
+
Prior to Oracle 10g client, these call PL/SQL functions such as
|
552
|
+
`DBMS_APPLICATION_INFO.SET_MODULE`, `DBMS_APPLICATION_INFO.SET_ACTION`,
|
553
|
+
and `DBMS_APPLICATION_INFO.SET_CLIENT_INFO` internally.
|
554
|
+
The change is reflected immediately by a network round trip.
|
555
|
+
|
556
|
+
### {OCI8::BindType.default_timezone}
|
557
|
+
|
558
|
+
The default time zone of Time or DateTime values. This parameter is used only when
|
559
|
+
|
560
|
+
* date values are fetched and the Oracle client version is 8.x
|
561
|
+
|
562
|
+
or
|
563
|
+
|
564
|
+
* object types have date data type attributes.
|
565
|
+
|
566
|
+
Note that if the Oracle client version is 9i or upper, the time
|
567
|
+
zone is determined by the session time zone. The default value
|
568
|
+
is local time zone. You can change it to GMT by executing the
|
569
|
+
following SQL statement for each connection.
|
570
|
+
|
571
|
+
alter session set time_zone = '00:00'
|
572
|
+
|
573
|
+
Note: The session time zone is set by the environment variable TZ from
|
574
|
+
ruby-oci8 2.1.0.
|
575
|
+
|
576
|
+
Other specification changes
|
577
|
+
---------------------------
|
578
|
+
|
579
|
+
- Add a global function OraNumber(obj) as a shortcut of OraNumber.new(obj)
|
580
|
+
as Rational and BigDecimal do.
|
581
|
+
|
582
|
+
- Fix to accept nil attribute in object type's
|
583
|
+
constructors. This works only for simple data types such as number,
|
584
|
+
string. But it doesn't for complex types such as object types.
|
585
|
+
(requested by Remi Gagnon)
|
586
|
+
|
587
|
+
- add DATE datatype support in object types.
|
588
|
+
|
589
|
+
- Change {OCI8::LOB#write} to accept an object which is not a String and
|
590
|
+
doesn't respond to 'to_str' as IO#write does.
|
591
|
+
(requested by Christopher Jones)
|
592
|
+
|
593
|
+
- Change the initial polling interval of
|
594
|
+
non-blocking mode for ruby 1.8 from 100 msec to 10 msec, which
|
595
|
+
is same with ruby-oci8 1.0.
|
596
|
+
|
597
|
+
Fixed installation issues
|
598
|
+
-------------------------
|
599
|
+
|
600
|
+
- Fix oraconf.rb for ruby 1.8.5 with Oracle 8.x which needs some object
|
601
|
+
files to link with.
|
602
|
+
|
603
|
+
(reported by Jayson Cena)
|
604
|
+
|
605
|
+
- Fix oraconf.rb for ruby 1.9.2 preview1.
|
606
|
+
|
607
|
+
(pointed by Raimonds Simanovskis)
|
608
|
+
|
609
|
+
- Fix oraconf.rb to compile for AIX instant clients.
|
610
|
+
|
611
|
+
(reported by Kazuya Teramoto)
|
612
|
+
|
613
|
+
2.0.2
|
614
|
+
=====
|
615
|
+
|
616
|
+
* add new methods
|
617
|
+
- {OCI8#select_one}
|
618
|
+
|
619
|
+
- {OCI8#ping} -> true or false
|
620
|
+
|
621
|
+
Verifies that the Oracle connection is alive.
|
622
|
+
{OCI8#ping} also can be used to flush all the pending OCI
|
623
|
+
client-side calls to the server if any exist.
|
624
|
+
|
625
|
+
- {OCI8#client\_identifier=}client\_id
|
626
|
+
|
627
|
+
Look at the following link to know what is the client identifier.
|
628
|
+
{http://it.toolbox.com/blogs/database-solutions/oracle-session-tracing-part-i-16356}
|
629
|
+
|
630
|
+
Note that the specified identifier doesn't change the v$session
|
631
|
+
immediately. It is done by the next network round trip
|
632
|
+
such as OCI8#exec or OCI8#ping.
|
633
|
+
|
634
|
+
* fix problems when compiling with Oracle 9.2 and 8.0.
|
635
|
+
|
636
|
+
(reported by Axel Reinhold)
|
637
|
+
|
638
|
+
* [dbi] fix to pass a newly added sanity check in dbi 0.4.1.
|
639
|
+
|
640
|
+
(reported by Dirk Herzhauser)
|
641
|
+
|
642
|
+
* fix an error when executing "select NULL from dual".
|
643
|
+
|
644
|
+
{http://rubyforge.org/forum/forum.php?thread\_id=32468&forum\_id=1078}
|
645
|
+
(contributed by Raimonds Simanovskis)
|
646
|
+
|
647
|
+
* [ruby 1.9] fix OCI8::BLOB to read/write binary. Prior to 2.0.1,
|
648
|
+
|
649
|
+
it was treated as text tagged with 'NLS_LANG' encoding.
|
650
|
+
|
651
|
+
* [ruby 1.9] fix to bind string data by the length got from String#bytesize
|
652
|
+
converted to {OCI8.encoding}, not by String#size.
|
653
|
+
|
654
|
+
2.0.1
|
655
|
+
=====
|
656
|
+
|
657
|
+
* release a binary gem for Windows, which contains libraries for both
|
658
|
+
ruby 1.8 and ruby 1.9.1.
|
659
|
+
* add {OCI8#oracle\_server\_version}.
|
660
|
+
* fix bugs when fetching and binding time objects.
|