Assets 5

Enhancements (C API)

  • Updated driver information set by OCILIB since v3.1.0 (column CLIENT_DRIVER in V$SESSION_CONNECT_INFO)
    • it is now including OCILIB version (e.g. "OCILIB : x.y.z" instead of "OCILIB")
  • Extended OCI_SeTrace() and OCI_GetTrace():
    • Added OCI_TRC_OPERATION: Name of the database operation set by the client application to be monitored (according Oracle docs)
    • This value is stored the database in the column DBOP_NAME of the system view V$SQLMONITOR
    • OCI_GetTrace() returns now NULL instead of an empty string if the given trace is not set or nullified
  • Release Windows binaries are now built using VS 2017 15.5.6 (instead of VS2017 15.3.2)

Fixes (C API)

  • Driver information (introduced in Oracle 11gR1: was set by OCILIB if
    • Oracle version >= 11gR1 for standalone connections and connections retrieved from connection pools
    • Oracle version >= 11gR2 for connections retrieved from session pools
    • Now it sets it correctly in all cases when Oracle version >= 11gR1
  • Issue #141: OCIBindRaw() now accepts empty buffers (non null data with size = 0)
  • Issue #142: OCI_GetStruct() was filling numeric fields with garbage values since v4.5.0
  • Issue #143: OCI_SetTrace(): passing NULL values for clearing trace information leads to segfaults
  • Issue #144: OCI_SetTrace(); If called at least once, it was causing small memory leak in OCI_ConnectionFree()
  • Issue #145: Using OCI_BAM_INTERNAL for types using handles was leading to segfault when executing the statement
    • Impacted types:OCI_Object, OCI_Lob, OCI_File, OCI_Timestamp, OCI_Interval, OCI_Ref and OCI_Collection

Fixes (C++ API)

  • Issue #141: ocilib::Statement::Bind<ocilib::Raw, unsigned int>() accepts now empty ocilib::Raw

Miscellaneous

  • OCILIB requires now C99 to be activated for compiling:
    • When using autotools (Unixes): Enforcing C99 compiler flags using AC_PROG_CC_STDC() macro
    • When using Visual Studio: OCILIB cannot be compiled anymore with VS2010 and earlier versions (released binaries use VS 2017)
    • This was motivated for using variadic macros and allow variable declarations not only at beginning of blocks
  • Addressed static code analysis hints and warnings
  • Internal code refactoring and factorization
  • Reduced cyclomatic complexity of some internal functions
    • Some methods (connection logon/logoff, bindings) were far too long and had been decomposed and split in smaller ones
  • Fixed demo an script files

@vrogier vrogier released this Feb 7, 2018 · 20 commits to master since this release

Assets 5

Enhancements (C and C++ API)

  • Extended support for non final UTDs
    • Added OCI_TypeInfoGetSuperType() and ocilib::TypeInfo::GetSuperType()
    • Added OCI_TypeInfoIsFinalType() and ocilib::TypeInfo::IsFinalType()
    • Added C and C++ demos about super types and sub types

Fixes (C API)

  • Issue #132, #133, #135: Fixed segfault while accessing to derived UTDs members (due to wrong members offset computation)
  • Issue #134: OCI_ObjectToText() and OCI_CollToText() were mangling conversion errors leading OCI_GetLastError() to not report conversion errors
  • Issue #136: OCI_RegisterSubscription() was not correctly setting port number if provided
  • Issue #137: BINARY_DOUBLE and BINARY_FLOAT values could not be set or retrieved from OCI_Elem and OCI_Object
  • Issue #139: OCI_ErrorGetInternalCode() may report wrong OCI_ERR_* value

Miscellaneous

  • Refactored internal numeric types conversions
  • Removed usage of deprecated symbols
  • Some code cleanup

@vrogier vrogier released this Nov 29, 2017 · 41 commits to master since this release

Assets 5

Enhancements (C API)

  • Issue #116: OCI_ColumnGetFullSQLType() returns now [schema].[typename] for UDTs (instead of [typename] only
  • Issue #122: Added default format OCI_FMT_TIMESTAMP_TZ when converting TIMESTAMP WITH TIMEZONE from/to strings
  • Added OCI_CST_MERGE statement type

Enhancements (C++ API)

  • Added support for new methods and constants added in C API v4.4.0:
    • Added Column::GetCollationID()
    • Added CollationID enumeration
    • Extended StatementType enumeration: added TypeMerge
    • Extended SessionFlags values: Added SessionSysAsm, SessionSysBkp SessionSysDgD, SessionSysKmt, SessionSysRac, SessionPreAuth

Fixes (C API)

  • Issue #117 : Fixed segfault in OCI_StatementFree() when OCI_Objects were binded to a statement and nullified with OCI_BindSetNull()
  • Issue #118 : Fixed OCI_NumberCompare() that was comparing the first number with itself
  • Issue #121 : Updated magic numbers (positive and negative infinity) handling in OCI_NumberToString() and OCI_NumberFromString()
  • Issue #124 : OCI_DirPathSetColumn() might use a buffer to small to convert datetime/timestamp/interval values

Miscellaneous:

  • Visual studio solutions/projects updates and cleanup

@vrogier vrogier released this Oct 26, 2017 · 55 commits to master since this release

Assets 5

Enhancements (C API)

  • OCI_Object: Supporting now non final object types
    • if an OCI_Object instance real type is a sub type of its column object type, OCILIB is dynamically retrieving its real and right type instead of processing it as its base type
    • Added missing synchronized access when iterating the list of existing OCI_TypeInfo in OCI_TypeInfoGet()
  • Allocation Binding mode updates
    • Added BindGetAllocationMode()
    • updated OCI_GetBindAllocation() and OCI_SetBindAllocation() documentation to properly specify their usage
  • Extended 12cR2 support:
    • Increased identifier size to 128
    • Added OCI_ColumnGetCollationID
    • Added more Oracle Session Mode
  • Refactored OCI_List implementation (Internal change)
    • No more access to OCI_List fields from other compilation units (encapsulation purposes)
    • Refactored OCI_List implementation

Fixes (C API)

  • Issue #112: OCI_GetString behaves badly with empty LOBs
  • Issue #104: XA connection open failed with ORA-12154
    • Fixed broken support for XA connections
    • Added 2 new error codes related to XA connections management (OCI_ERR_XA_ENV_FROM_STRING, OCI_ERR_XA_CONN_FROM_STRING)
  • Issue #101: Wrong OCI_STRING_FORMAT_TIMESTAMP constant
  • Fix for Oracle bug #9838993 workaround
    • Version 4.2.1 introduced support for an experimental workaround for Oracle bug 9838993 (memory leak when using unicode and re-preparing/executing same statement multiple times)
    • This support was not always working as column names where sometimes not null terminated

@vrogier vrogier released this Jun 7, 2017 · 73 commits to master since this release

Assets 5

Fixes (C API)

  • Issue #81: Fixed OCI_GetInt() on string columns
    • Wrong implicit string to integer conversion (returning 0 whatever string value) occurred under following conditions:
      • Column is string based
      • Oracle client < 12gR1
      • Using OCI_GetInt() or OCI_GetUnsignedInt()
  • Issue #86: Fixed wrong error information when statement execution failed involving 64bit integer binds
    • It occurred under following conditions:
      • Binding 64bit integer host variables with OCI_BDM_OUT flag set (default if OCI_BindSetDirection() has not been called)
      • Statement execution failed on the server for any reasons (server side error, constraint violation, ..)
    • Real server side error information was not reported by OCI_GetLastError() or error callback
    • Instead an error "OCI-22060: argument [2] is an invalid or uninitialized number" was reported
  • Issue #88: Fixed OCI_GetString() on BLOB columns with blob size > 1024 bytes
    • Filling the resulting string with BLOB data led to a buffer overflow
  • Issue #89: Fixed Segfault occurring in OCI_Execute()
    • The issue was a wrong offset computation when trying to update user strings after execution.
    • It occurred under following conditions:
      • OCI_CHARSET_WIDE (Unicode) ocilib build
      • Unix/Linux (wchar_t implemented as 32bit integers)
      • Binding host string variable with OCI_BDM_OUT flag set (default if OCI_BindSetDirection() has not been called)

Fixes (C++ API)

  • Issue #63: (Re)Added cstddef header in ocilib_core.hpp as on some platforms/compiler versions, it was reported as needed (including iterator header was not enough)

Enhancements (C API)

  • Issue #84: Add support for numeric type in OCI_ColumnGetSubType() with limitations as real numeric type cannot really be identified

@vrogier vrogier released this Feb 8, 2017 · 88 commits to master since this release

Assets 5

Fixes (C API)

    - Issue #69: Fixed OCI_StatementGetConnection() that was returning erroneous values (regression introduced in v4.3.0)
    - Issue #70: Fixed Subscriptions issues when OCILIB charset is OCI_CHARSET_WIDE (Unicode builds)
    - Issue #71: Fixed regresson introduced in v4.3.0 about binding big_uint variables (only unsigned 64bit integers)
    - Issue #72: Fixed OCI_LobErase() return value that was wrong since v4.3.0 (1 on success and 0 on failure) instead of the number of elements erased from the LOB
    - Issue #75: Fixed OCI_ElemIsNull() that was marking the call as failed is the value was not NULL (regression introduced in v4.3.0)
    - Issue #78: Fixed usage of OCI_SetBindAllocation() when switching bind allocation mode that may result in memory leaks
    - Issue #79: Fixed issues in implicit conversion in OCI_GetString()

Changes and Enhancements

    - Issue #73: Activate support for N' substitution (nchar replacement in SQL statement strings) when source code is unicode (Only for Oracle Client >= 10gR2)
    - Issue #74: Added support for OCI_Number in format calls   
    - Issue #79: Added support for OCI_Statement (cursors) in OCI_GetString()

Miscellaneous

    - Removed outdated unmaintained Visual Studio 2005, 2008 an 2010 projects for building OCILIB DLLs and C/C++ tests apps
    - Keeping visual Studio 2013 projects
    - Added Visual Studio 2015 projects
    - Prebuilt Windows OCILIB dlls are now compiled using Visual Studio 2015

@vrogier vrogier released this Jan 25, 2017 · 110 commits to master since this release

Assets 5

Fixes (C API)

    - Issue #60: Fixed bug introduced in v4.3.0 related to binding arrays of big ints
    - Issue #64: Fixed structure size computation for Object members that are Objects
    - Issue #65: Fixed Binding null/non initialized OCI_Number
    - Issue #68: Fixed OCI_Execute() behavior with PL/SQL "select into" and no data found

Fixes (C++ API)

    - Issue #63: Added cstddef header in ocilib_core.hpp as on some platforms/compiler versions, it was reported as needed
    - Issue #67: Fixed memory leak when using Number objects

Changes:

    - Request #66: Increased value of OCI_BIND_MAX from 1024 to 65535

@vrogier vrogier released this Nov 9, 2016 · 124 commits to master since this release

Assets 5

New Features

* Added NUMBER SQL type native wrapping          
        - Optional type as NUMBER type can still be fetched/binded using regular C native numeric types
        - New OCI_Number type can be used when precision matters or for dealing with special values such as positive and negative infinity
        - C API : 
                Added OCI_NUM_NUMBER numeric type
                Added OCI_Number type
                Added OCI_NumberCreate()
                Added OCI_NumberFree()
                Added OCI_NumberArrayCreate()
                Added OCI_NumberArrayFree()
                Added OCI_NumberAssign()
                Added OCI_NumberGetContent()
                Added OCI_NumberSetContent()
                Added OCI_NumberSetValue()
                Added OCI_NumberGetValue()
                Added OCI_NumberAdd()
                Added OCI_NumberSub()
                Added OCI_NumberMultiply()
                Added OCI_NumberDivide()
                Added OCI_NumberCompare()
                Added OCI_GetNumber()
                Added OCI_GetNumber2()
                Added OCI_BindNumber()
                Added OCI_BindArrayOfNumbers()
                Added OCI_RegisterNumber()
                Added OCI_NumberFromText()
                Added OCI_NumberToText()
                Added OCI_ElemGetNumber()
                Added OCI_ElemSetNumber()
                Added OCI_ObjectGetNumber()
                Added OCI_ObjectSetNumber()                
        - C++ API: 
                Added ocilib::Number type encapsulating the C API OCI_Number type
                This new type comes with all possible operator overloads for better usability

Fixes:

* OCI_ObjectGetString(): Fixed usage of internal temporary buffers
* OCI_FileRead(): Return value was not the correct one
* OCI_PoolGetConnection() : was returning NULL connections for session pool using external credentials
* OCI_StringGetFromType() : Fixed segfault when converting CLOBs (with length > to 512) to UTF8 strings in OCI_GetString() if an UTF8 charset is used
* Fix indicators usage for collections : OCI_IsNull() always returned FALSE even if fetched collection was NULL
* Fix compilation under C compilers not supporting C99 feature allowing declaring variables anywhere in blocks

Miscellaneous

* C API: Added OCI_GetDataSize() and OCI_GetDataSize2()
* C API: Major internal code re-factoring       
        - Code factorization
        - Replaced verbose macros with more compact ones
        - Code base reduced by few thousands lines of code
        - Fixed some error handling logic
* C++ API: 
        - Rewrote iterators for ocilib::Collection<> 
        - Collection Iterators are now random iterators allowing Collections being used with STL algorithms such as std::sort()
        - Added Collection const_iterators
        - Addressed various code analysis hints
        - Added C++ compiler capabilities detection (C+11)
* Updated samples in folder /demo
        - dded required DDL and DML for all samples
        - Updated some samples

@vrogier vrogier released this Mar 21, 2016 · 183 commits to master since this release

Assets 5

Licensing

* Re-licensing OCILIB to Apache License Version 2.0 instead of LGPL 2.1: this is merely for overcoming the static linkage issue of the LGPL V2.1      

Fixes:

* C++ API: Fixed memory leak caused by Statement::Bind() with non scalar types when Connection objects are closed before their child Statement objects get out of scope
* C++ API: Fixed minor compilation warnings
* C API: Compilation was broken when targeting Oracle 8i
* C API: PL/SQL statements starting with keyword "CALL" where not identified as PL/SQL commands and thus output bind buffers were not updated accordingly
* C API: OCI_Execute() ignored custom fetch and prefetch values with Oracle clients >= 9.2
* C API: OCI_ElemSetString() caused memory retention when dealing repetitively with string attributes
* C API: OCI_Cleanup() leaked of few bytes
* C API: OCI_BindLob() caused access violation when binding CLOB/BLOB to PL/SQL OUT parameters using OCI_BDM_OUT bind direction mode   
* C API: OCI_DirPathSetEntry() may passed Wrong SQL type passed to OCI_NumberFromString() for some numeric columns
* C API: OCI_GetLastError() wWas not reporting errors/warnings after the following calls: OCI_FetchPrev(), OCI_FetchNext(), OCI_FetchFirst() and OCI_FetchLast()
* C API: OCI_MemRealloc() may manipulate dandling pointers
* C API: Fixed some usage of OCI_BIND_CALL() macro
* C API: OCI_ObjectGettring(): When the attribute type was not a string, the application error handler
         was called with error code OCI_ERR_ATTR_NOT_FOUND and then the method was converting the attribute to a string without problem as expected.

Changes

* Added "Environment Variables" section in the C API documentation
* C++ API: Added silent parameter to Date::Date()
* C API: Fetch and Prefetch values are not reset any more to default values when statement is re-prepared
* C API: Added support for specific environment variables: Now specific documented environment variables can be set for activating
         experimental or optional behaviours mostly for implementing workaround for Oracle Bugs.
* C API: Added experimental workaround for unsolved Oracle OCI bug #9838993 using the environment variable "OCILIB_WORKAROUND_UTF16_COLUMN_NAME"

@vrogier vrogier released this Sep 21, 2015 · 243 commits to master since this release

Assets 5

New Features:

Implemented Oracle 12c extended support for PL/SQL types
* Support for  PL/SQL boolean, records and index by tables
* These types can be now used in binding calls
* C API: PL/SQL records can now be used using OCI_Object
* C API: PL/SQL Index by tables can now be used using OCI_Coll
* C API: PL/SQL boolean can be used using boolean C type
* C API: Added OCI_BindBoolean()
* C API: Added OCI_ElemSetBoolean(), OCI_ElemGetBoolean()
* C API: Added OCI_ObjectSetBoolean(), OCI_ObjectGetBoolean()
* C API: OCI_TypeInfoGet() supports now records these PL/SQL types
* C API: Added collection type OCI_COLL_INDEXED_TABLE
* C API: Added data type OCI_CDT_BOOLEAN
* C++ API: PL/SQL records can now be used using ocilib::Object
* C++ API: PL/SQL Index by tables can now be used using ocilib::Collection<T>
* C++ API: PL/SQL boolean can be used using bool C++ type
* C++ API: Added template specializations for supporting PL/SQL boolean using C++ bool in the following calls:
    - ocilib::Statement::Bind()
    - ocilib::Object::Get()
    - ocilib::Object::Set()
* C++ API: Added ocilib::Collection<T> specializations for supporting bool data type
* C++ API: Added ocilib::TypeBoolean
* C++ API: Added ocilib::Collection::IndexedTable
* C++ API: Added internal core class ocilib::BindTypeAdaptor<T1, T2>
Added Memory usage information
* C API: Added OCI_GetAllocatedBytes
* C API: Added OCI_MEM_ORACLE, OCI_MEM_OCILIB and OCI_MEM_ALL
* C++ API: Added ocilib::Environment::GetAllocatedBytes()
* C++ API: Added ocilib::Environment::OracleClientBytes, ocilib::Environment::OcilibBytes, ocilib::Environment::AllBytes
Added Session Max Cursor information
* C API: Added OCI_GetMaxCursors()
* C++ API: Added ocilib::Connection::GetMaxCursors()

Enhancements:

C++ API:: Enhanced pre/post statement execution check for binds
* Before execution, bind buffers are only updated from host variables if Bind Direction has the ocilib::BindInfo::In flag
* After execution, host variables are only updated from bind buffers if Bind Direction has the ocilib::BindInfo::Out flag

Fixes:

* C API: Fixed OCI_GetLastError() that returned NULL after OCI_Initialize() if OCI shared lib cannot be loaded
* C API: Fixed OCI_ColumnGetSQLType() that has its break statements within the switch removed by mistake leading to return "?" in all cases
* C API: Fixed OCI_ElemSetXXX() where XXX is a numeric type
* C API: Fixed OCI_IterFree() when dealing with numbers
* C API: Fixed Memory retention in local OCI objects cache when calling OCI_ObjectFree(): Objects indicator structures were not freed until calling OCI_Cleanup()
* C API: Fixed OCI_ElemSetXXX() for numeric types when element is created using OCI_ElemCreate() instead of being retrieved with OCI_IterGetPrev() or OCI_IterGetNext()
* C API: When OCI_SubscriptionRegister() failed, the input connection was freed leading the caller to hold a dangling pointer to the connection handle
* C API: Fixed comparison call in OCI_TimestampCompare()
* C API: Fixed alignment computation in OCI_GetStruct()
* C API: Fixed alignment computation in OCI_ObjectGetUserStructSize()
* C API: Fixed compilation under compilers that require variable to be declared at the beginning of blocks (example : VS2010)
* C API: Fixed minor internal bugs and issues
* C++ API: ocilib::HandleHolder<T>::Acquire() => Made sure that a smart handle is not allocated if the input C handle is NULL (even if it shall not happen as the C API must raise an error if it cannot return a valid handle)
* C++ API: ocilib::HandleHolder<T>::SmartHandle::~SmartHandle() => the C API handle free function is now called only if the handle is not NULL
* C++ API: Fixed compilation error when using OCI_CHARSET_WIDE
* C++ API: Fixed ocilib::Raw binding when using OCI_CHARSET_WIDE
* C++ API: Fixed ocilib::BindArray::BindArrayObject<Raw, unsigned char>::SetInData()
* C++ API: Fixed binding array of Blobs
* C++ API: Fixed binding array of Raw

Miscellaneous

* Doxygen documentation: Added C and C++ data types mappings documentation page
* Removed references to sourceforge.net
* Minor internal code changes to fixing hypothetical issues found by code analysis (CppCheck)
* Fixed some typos and formatting issues