Skip to content

Commit 4779f1e

Browse files
committed
Fix build error with Oracle client 11.2.0.1 and 11.2.0.2
1 parent eeb2434 commit 4779f1e

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Change Log
22

3+
## node-oracledb v1.9.3 (24 May 2016)
4+
5+
- Fix error with `OCI_ERROR_MAXMSG_SIZE2` when building with Oracle client 11.2.0.1 and 11.2.0.2.
6+
37
## node-oracledb v1.9.2 (23 May 2016)
48

5-
- Fix `results.metaData` for queries with `{resultSet: true}`
9+
- Fix `results.metaData` for queries with `{resultSet: true}`.
610

711
## node-oracledb v1.9.1 (18 May 2016)
812

src/dpi/src/dpiUtils.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838
#define snprintf _snprintf
3939
#endif
4040

41+
#ifdef OCI_ERROR_MAXMSG_SIZE2
42+
/* A bigger message size is defined from 11.2.0.3 onwards */
43+
#define DPIUTILS_OCI_ERR_MAX_SIZE OCI_ERROR_MAXMSG_SIZE2
44+
#else
45+
#define DPIUTILS_OCI_ERR_MAX_SIZE OCI_ERROR_MAXMSG_SIZE
46+
#endif
4147

4248
/*****************************************************************************/
4349
/*
@@ -67,12 +73,12 @@ static void ociCallCommon(sword rc, void *handle, ub4 errType)
6773
if (rc == OCI_INVALID_HANDLE)
6874
throw ExceptionImpl(DpiOciInvalidHandle);
6975

70-
OraText ociErrorMsg[OCI_ERROR_MAXMSG_SIZE2];
76+
OraText ociErrorMsg[DPIUTILS_OCI_ERR_MAX_SIZE];
7177
sb4 ociErrorNo = 0;
72-
memset(ociErrorMsg, 0, OCI_ERROR_MAXMSG_SIZE2);
78+
memset(ociErrorMsg, 0, DPIUTILS_OCI_ERR_MAX_SIZE);
7379

7480
rc = OCIErrorGet(handle, 1, NULL, &ociErrorNo, ociErrorMsg,
75-
OCI_ERROR_MAXMSG_SIZE2-1, errType);
81+
DPIUTILS_OCI_ERR_MAX_SIZE-1, errType);
7682
if (rc)
7783
throw ExceptionImpl(DpiErrUnkOciError);
7884
else

0 commit comments

Comments
 (0)