summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omoracle/omoracle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/omoracle/omoracle.c b/plugins/omoracle/omoracle.c
index c3acfb38..31e498f7 100644
--- a/plugins/omoracle/omoracle.c
+++ b/plugins/omoracle/omoracle.c
@@ -346,23 +346,23 @@ static void log_detailed_err(instanceData* pData)
OCIAttrGet(pData->statement, OCI_HTYPE_STMT, &errs, 0,
OCI_ATTR_NUM_DML_ERRORS, pData->error);
- dbgprintf("There were %d errors\n", errs);
+ errmsg.LogError(0, NO_ERRCODE, "%d errors in statement execution\n",
+ errs);
+ OCIHandleAlloc(pData->environment, &er, OCI_HTYPE_ERROR,
+ 0, NULL);
+ OCIHandleAlloc(pData->environment, &er2, OCI_HTYPE_ERROR,
+ 0, NULL);
for (i = 0; i < errs; i++) {
- dbgprintf("Allocating stuff %d\n", i);
- OCIHandleAlloc(pData->environment, &er2, OCI_HTYPE_ERROR,
- 0, NULL);
- dbgprintf("ParamGet %d\n", i);
OCIParamGet(pData->error, OCI_HTYPE_ERROR,
er2, &er, i);
- dbgprintf("AttrGet %d\n", i);
OCIAttrGet(er, OCI_HTYPE_ERROR, &row, 0,
OCI_ATTR_DML_ROW_OFFSET, er2);
- dbgprintf("ErrorGet %d\n", i);
OCIErrorGet(er, row, NULL, &code, buf, sizeof buf,
OCI_HTYPE_ERROR);
errmsg.LogError(0, NO_ERRCODE, "FAILURE DETAILS: %s", buf);
- OCIHandleFree(er2, OCI_HTYPE_ERROR);
}
+ OCIHandleFree(er, OCI_HTYPE_ERROR);
+ OCIHandleFree(er2, OCI_HTYPE_ERROR);
}