[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.104
Matthew T. Kromer
matt@zope.com
Fri, 8 Feb 2002 11:06:51 -0500
Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv461
Modified Files:
dco2.c
Log Message:
Back out AI changes
=== Products/DCOracle2/src/dco2.c 1.103 => 1.104 ===
if (status != OCI_SUCCESS) {
-
- /* free here the prior allocated statement handle */
- if (cursor->stmtp != NULL) {
- TRACE(T_HCALL,("ssA","OCIHandleFree","OCI_HTYPE_STMT",
- cursor->stmtp));
- status = OCIHandleFree(cursor->stmtp, OCI_HTYPE_STMT);
- TRACE(T_HRETURN,("sR","OCIHandleFree",status));
- if (status != OCI_SUCCESS)
- fprintf(stderr,"OCI_ERROR %d at %s:%d\n", status,
- __FILE__, __LINE__ - 3);
- cursor->stmtp = NULL;
- }
-
cursor->errhp = NULL;
RaiseOCIError(self->envhp, OCI_HTYPE_ENV);
Py_DECREF(cursor);
@@ -2842,7 +2829,7 @@
valuep, valuesz,
self->bind[pos].dty, *indp));
- TRACE((T_CALL | T_INFO),("ssdddd","OCIBindByPos","supplemental",
+ TRACE((T_CALL | T_INFO),("ssdAdd","OCIBindByPos","supplemental",
nelem, nelemp, mode, *alenp));
TRACE((T_CALL | T_INFO),("ssdAAA","OCIBindByPos","arrays",
@@ -3466,19 +3453,6 @@
TRACE(T_ENTRY,("sAA", "Cursor_fetch", self, args));
- /* AI-Patch: throw an error if somebody tries to fetch again
- ** after getting all data out of the cursor without
- ** reexecuting Cursor_execute. Because this causes remaining
- ** open cursors in a multithreading environment
- */
- if (self->batchct && self->current==-1)
- {
- PyErr_SetString(ProgrammingErrorObject,
- "Fetch on empty cursor");
- return NULL;
- }
-
-
/* bindObject may have bound this cursor, in which case we
** must refetch the description
*/
@@ -3559,7 +3533,7 @@
OCIErrorGet(self->errhp, 1, NULL, &errcode, buff,
sizeof(buff), OCI_HTYPE_ERROR);
/* Oracle errors meaning "end of fetch"
- ** 1403 is no data found
+ ** 1403 is
** 1002 is fetch out of sequence
*/
@@ -5737,13 +5711,6 @@
} else if (precision < 10) {
sscanf((char *) data, "%ld", &l);
result = PyInt_FromLong(l);
- } else if (precision == 10 && len<10) {
- /* AI-Patch: if we have a number(10) db field and
- ** it is possible to store it in an integer variable
- ** then use an PyInt instead of PyLong
- */
- sscanf((char *) data, "%ld", &l);
- result = PyInt_FromLong(l);
} else {
result = PyLong_FromString((char *)data, NULL, 10);
}
@@ -6431,7 +6398,6 @@
TRACE(T_TSWITCH,("sd", "ThreadSwitch", tid));
}
}
-
if (traceNext >= traceCount) traceNext = 0;
tr = traceBase + traceNext++;