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