ruby-oci8 2.0.5 → 2.0.6
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.
- data/ChangeLog +9 -0
- data/NEWS +10 -0
- data/VERSION +1 -1
- data/ext/oci8/apiwrap.yml +1 -1
- data/ext/oci8/attr.c +1 -1
- data/ext/oci8/bind.c +1 -1
- data/ext/oci8/lob.c +8 -13
- data/ext/oci8/oci8lib.c +1 -1
- data/ext/oci8/ocidatetime.c +1 -1
- data/ext/oci8/oradate.c +1 -1
- metadata +7 -22
data/ChangeLog
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
2011-06-14 KUBO Takehiro <kubo@jiubao.org>
|
2
|
+
* NEWS: add changes between 2.0.5 and 2.0.6.
|
3
|
+
* VERSION: change the version to 2.0.6.
|
4
|
+
* ext/oci8/apiwrap.yml, ext/oci8/lob.c: fix SEGV when freeing a temporary
|
5
|
+
LOB during GC on rubinius 1.2.3.
|
6
|
+
* ext/oci8/oci8lib.c: revert the exception type from RuntimeError to
|
7
|
+
OCIException when a closed OCI handle's method is called.
|
8
|
+
It was chaned in 2.0.5 by mistake.
|
9
|
+
|
1
10
|
2011-06-12 KUBO Takehiro <kubo@jiubao.org>
|
2
11
|
* NEWS: add changes between 2.0.4 and 2.0.5.
|
3
12
|
* VERSION: change the version to 2.0.5.
|
data/NEWS
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
2.0.6:
|
2
|
+
|
3
|
+
* Fixed issues
|
4
|
+
|
5
|
+
- fix SEGV when freeing a temporary LOB during GC on rubinius 1.2.3.
|
6
|
+
|
7
|
+
- revert the exception type from RuntimeError to OCIException when
|
8
|
+
a closed OCI handle's method is called. It was chaned in 2.0.5
|
9
|
+
by mistake.
|
10
|
+
|
1
11
|
2.0.5:
|
2
12
|
|
3
13
|
* New Features
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.6
|
data/ext/oci8/apiwrap.yml
CHANGED
data/ext/oci8/attr.c
CHANGED
data/ext/oci8/bind.c
CHANGED
data/ext/oci8/lob.c
CHANGED
@@ -23,6 +23,7 @@ enum state {
|
|
23
23
|
typedef struct {
|
24
24
|
oci8_base_t base;
|
25
25
|
VALUE svc;
|
26
|
+
OCISvcCtx *svchp;
|
26
27
|
ub4 pos;
|
27
28
|
int char_width;
|
28
29
|
ub1 csfrm;
|
@@ -96,28 +97,20 @@ static void oci8_lob_mark(oci8_base_t *base)
|
|
96
97
|
rb_gc_mark(lob->svc);
|
97
98
|
}
|
98
99
|
|
99
|
-
static VALUE free_temp_lob(oci8_lob_t *lob)
|
100
|
-
{
|
101
|
-
oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
|
102
|
-
|
103
|
-
OCILobFreeTemporary_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob);
|
104
|
-
return Qnil;
|
105
|
-
}
|
106
|
-
|
107
100
|
static void oci8_lob_free(oci8_base_t *base)
|
108
101
|
{
|
109
102
|
oci8_lob_t *lob = (oci8_lob_t *)base;
|
110
103
|
boolean is_temporary;
|
111
104
|
|
112
|
-
if (have_OCILobIsTemporary
|
105
|
+
if (have_OCILobIsTemporary && lob->svchp != NULL
|
113
106
|
&& OCILobIsTemporary(oci8_envhp, oci8_errhp, lob->base.hp.lob, &is_temporary) == OCI_SUCCESS
|
114
107
|
&& is_temporary) {
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
rb_rescue(free_temp_lob, (VALUE)base, NULL, 0);
|
108
|
+
|
109
|
+
/* FIXME: This may stall the GC. */
|
110
|
+
OCILobFreeTemporary(lob->svchp, oci8_errhp, lob->base.hp.lob);
|
119
111
|
}
|
120
112
|
lob->svc = Qnil;
|
113
|
+
lob->svchp = NULL;
|
121
114
|
}
|
122
115
|
|
123
116
|
static oci8_base_class_t oci8_lob_class = {
|
@@ -191,6 +184,7 @@ static VALUE oci8_lob_do_initialize(int argc, VALUE *argv, VALUE self, ub1 csfrm
|
|
191
184
|
oci8_env_raise(oci8_envhp, rv);
|
192
185
|
lob->base.type = OCI_DTYPE_LOB;
|
193
186
|
lob->svc = svc;
|
187
|
+
lob->svchp = NULL;
|
194
188
|
lob->pos = 0;
|
195
189
|
lob->char_width = 1;
|
196
190
|
lob->csfrm = csfrm;
|
@@ -202,6 +196,7 @@ static VALUE oci8_lob_do_initialize(int argc, VALUE *argv, VALUE self, ub1 csfrm
|
|
202
196
|
oci8_svcctx_t *svcctx = oci8_get_svcctx(svc);
|
203
197
|
OCI8StringValue(val);
|
204
198
|
oci_lc(OCILobCreateTemporary_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, 0, csfrm, lobtype, TRUE, OCI_DURATION_SESSION));
|
199
|
+
lob->svchp = oci8_get_oci_svcctx(svc);
|
205
200
|
oci8_lob_write(self, val);
|
206
201
|
} else {
|
207
202
|
rb_raise(rb_eRuntimeError, "creating a temporary lob is not supported on this Oracle version");
|
data/ext/oci8/oci8lib.c
CHANGED
@@ -498,7 +498,7 @@ oci8_base_t *oci8_get_handle(VALUE obj, VALUE klass)
|
|
498
498
|
}
|
499
499
|
Data_Get_Struct(obj, oci8_base_t, hp);
|
500
500
|
if (hp->type == 0) {
|
501
|
-
rb_raise(
|
501
|
+
rb_raise(eOCIException, "%s was already closed.",
|
502
502
|
rb_obj_classname(obj));
|
503
503
|
}
|
504
504
|
return hp;
|
data/ext/oci8/ocidatetime.c
CHANGED
data/ext/oci8/oradate.c
CHANGED
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-oci8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 2
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
version: 2.0.5
|
4
|
+
version: 2.0.6
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- KUBO Takehiro
|
@@ -14,13 +9,11 @@ autorequire:
|
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
11
|
|
17
|
-
date: 2011-06-
|
12
|
+
date: 2011-06-14 00:00:00 +09:00
|
18
13
|
default_executable:
|
19
14
|
dependencies: []
|
20
15
|
|
21
|
-
description:
|
22
|
-
ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available with Oracle8, Oracle8i, Oracle9i, Oracle10g and Oracle Instant Client.
|
23
|
-
|
16
|
+
description: ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available with Oracle8, Oracle8i, Oracle9i, Oracle10g and Oracle Instant Client.
|
24
17
|
email: kubo@jiubao.org
|
25
18
|
executables: []
|
26
19
|
|
@@ -109,8 +102,6 @@ files:
|
|
109
102
|
- test/test_rowid.rb
|
110
103
|
has_rdoc: true
|
111
104
|
homepage: http://ruby-oci8.rubyforge.org
|
112
|
-
licenses: []
|
113
|
-
|
114
105
|
post_install_message:
|
115
106
|
rdoc_options:
|
116
107
|
- --main
|
@@ -118,29 +109,23 @@ rdoc_options:
|
|
118
109
|
require_paths:
|
119
110
|
- lib
|
120
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
112
|
requirements:
|
123
113
|
- - ">="
|
124
114
|
- !ruby/object:Gem::Version
|
125
|
-
segments:
|
126
|
-
- 1
|
127
|
-
- 8
|
128
|
-
- 0
|
129
115
|
version: 1.8.0
|
116
|
+
version:
|
130
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
118
|
requirements:
|
133
119
|
- - ">="
|
134
120
|
- !ruby/object:Gem::Version
|
135
|
-
segments:
|
136
|
-
- 0
|
137
121
|
version: "0"
|
122
|
+
version:
|
138
123
|
requirements: []
|
139
124
|
|
140
125
|
rubyforge_project: ruby-oci8
|
141
|
-
rubygems_version: 1.3.
|
126
|
+
rubygems_version: 1.3.1
|
142
127
|
signing_key:
|
143
|
-
specification_version:
|
128
|
+
specification_version: 2
|
144
129
|
summary: Ruby interface for Oracle using OCI8 API
|
145
130
|
test_files:
|
146
131
|
- test/test_all.rb
|