diff --git a/Connection.c b/Connection.c index ba59dbe..7fb2791 100644 --- a/Connection.c +++ b/Connection.c @@ -418,6 +418,17 @@ static int Connection_Connect( return -1; } +#ifdef OCI_ATTR_DRIVER_NAME +printf("setting driver name to %s\n", DRIVER_NAME); + status = OCIAttrSet(self->sessionHandle, OCI_HTYPE_SESSION, + (text*) DRIVER_NAME, strlen(DRIVER_NAME), OCI_ATTR_DRIVER_NAME, + self->environment->errorHandle); + if (Environment_CheckForError(self->environment, status, + "Connection_Connect(): set driver name") < 0) + return -1; + +#endif + // set the session handle on the service context handle status = OCIAttrSet(self->handle, OCI_HTYPE_SVCCTX, self->sessionHandle, 0, OCI_ATTR_SESSION, diff --git a/HISTORY.txt b/HISTORY.txt index a32bb88..f410141 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -16,24 +16,26 @@ Changes from 4.3.3 to 4.4 during the rollback; unfortunately, Oracle decides to commit data even when dropping a connection from the pool instead of rolling it back so the attempt still has to be made. - 7) Use cx_Oracle.InterfaceError rather than the builtin RuntimeError when + 7) Added support for setting CLIENT_DRIVER in V$SESSION_CONNECT_INFO in Oracle + 11g and higher. + 8) Use cx_Oracle.InterfaceError rather than the builtin RuntimeError when unable to create the Oracle environment object as requested by Luke Mewburn since the error is specific to Oracle and someone attempting to catch any exception cannot simply use cx_Oracle.Error. - 8) Translated some error codes to OperationalError as requested by Matthew + 9) Translated some error codes to OperationalError as requested by Matthew Harriger; translated if/elseif/else logic to switch statement to make it more readable and to allow for additional translation if desired. - 9) Transformed documentation to new format using restructured text. Thanks to +10) Transformed documentation to new format using restructured text. Thanks to Waldemar Osuch for contributing the initial draft of the new documentation. -10) Allow the password to be overwritten by a new value as requested by Alex +11) Allow the password to be overwritten by a new value as requested by Alex VanderWoude; this value is retained as a convenience to the user and not used by anything in the module; if changed externally it may be convenient to keep this copy up to date. -11) Cygwin is on Windows so should be treated in the same way as noted by +12) Cygwin is on Windows so should be treated in the same way as noted by Matthew Cahn. -12) Add support for using setuptools if so desired as requested by Shreya +13) Add support for using setuptools if so desired as requested by Shreya Bhatt. -13) Specify that the version of Oracle 10 that is now primarily used is 10.2, +14) Specify that the version of Oracle 10 that is now primarily used is 10.2, not 10.1. Changes from 4.3.2 to 4.3.3 diff --git a/cx_Oracle.c b/cx_Oracle.c index f5a8048..20af427 100644 --- a/cx_Oracle.c +++ b/cx_Oracle.c @@ -50,10 +50,11 @@ typedef int Py_ssize_t; if (PyModule_AddObject(module, name, (PyObject*) type) < 0) \ return; -// define macro to get the build version as a string +// define macros to get the build version as a string and the driver name #define xstr(s) str(s) #define str(s) #s #define BUILD_VERSION_STRING xstr(BUILD_VERSION) +#define DRIVER_NAME "cx_Oracle-"BUILD_VERSION_STRING //-----------------------------------------------------------------------------