diff --git a/ChangeLog b/ChangeLog index 8067044a..b9583d61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2019-02-17 Version 4.6.1 Vincent Rogier vince.rogier@ocilib.net + + * Fixes (C API) + + - Issue #188: Compile error with Oracle client 12.1 and option OCI_IMPORT_LINKAGE + - Issue #196: Warning 4996 + - Issue #198: Compile Error with Oracle Client 12.2 and option OCI_ATTR_CALL_TIMEOUT + - Issue #199: Compile warnings on Oracle Client 12.2 + + * Fixes (C++ API) + + - Issue #182: Cannot bind a std::vector as a PL/SQL Table (v4.6.0 fixed the issue only for 1st element of the vector) + - Issue #189: In/out binded vector not updated after statement execution + - Issue #191: Reassigning SAME C handle to C++ a object leads to loose the content of the C handle + - Issue #192: Vectors of non scalar types binded as pure OUT binds are not updated after execution if vector element do not have their value set + - Issue #200: Compiler warning 4018 with 4.6.0 + + * Miscellaneous: + + - Updated compilers for MS Windows prebuilt binaries + * VS2017 15.9.7 for 32/64 bit DLLs + - Prebuilt static libraries built with TDM-GCC (Code::Blocks projects) are not shipped anymore + * Recent TDM- GCC versions produces executables that links statically against winpthreads + * This implies requirements and restrictions that motivated to remove prebuilt libs from ocilib releases + * Users can compile them using the provided Code::Blocks project + 2018-11-21 Version 4.6.0 Vincent Rogier vince.rogier@ocilib.net * Changes diff --git a/Makefile.am b/Makefile.am index f9886c1c..0f8eacaa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/Makefile.in b/Makefile.in index c811bbd1..8990a672 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/NEWS b/NEWS index 770e7922..5edae812 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ ocilib -- History of visible changes. -Copyright (c) 2007-2018 Vincent ROGIER +Copyright (c) 2007-2019 Vincent ROGIER See the end for copying conditions. Please send ocilib bug reports to vince.rogier@ocilib.net. @@ -8,7 +8,7 @@ Please send ocilib bug reports to vince.rogier@ocilib.net. ------------------------------------------------------- Copying information: -Copyright (c) 2007-2018 Vincent ROGIER +Copyright (c) 2007-2019 Vincent ROGIER Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/README b/README index 7b3992cc..c5e12ca6 100644 --- a/README +++ b/README @@ -1,19 +1,12 @@ - +----------------------------------------------------------------------+ - | | - | OCILIB - C Driver for Oracle | - | | - | (C Wrapper for Oracle OCI) | - | | - +----------------------------------------------------------------------+ - | | - | Website : http://www.ocilib.net | - | | - +----------------------------------------------------------------------+ - | | - | Copyright (c) 2007-2018 Vincent ROGIER | - | | - +----------------------------------------------------------------------+ - + /* + * OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI) + * + * Website: http://www.ocilib.net + * + * Copyright (c) 2007-2019 Vincent ROGIER + * + */ + =========================================================================== DESCRIPTION =========================================================================== diff --git a/README.in b/README.in index 7b3992cc..c5e12ca6 100644 --- a/README.in +++ b/README.in @@ -1,19 +1,12 @@ - +----------------------------------------------------------------------+ - | | - | OCILIB - C Driver for Oracle | - | | - | (C Wrapper for Oracle OCI) | - | | - +----------------------------------------------------------------------+ - | | - | Website : http://www.ocilib.net | - | | - +----------------------------------------------------------------------+ - | | - | Copyright (c) 2007-2018 Vincent ROGIER | - | | - +----------------------------------------------------------------------+ - + /* + * OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI) + * + * Website: http://www.ocilib.net + * + * Copyright (c) 2007-2019 Vincent ROGIER + * + */ + =========================================================================== DESCRIPTION =========================================================================== diff --git a/VERSION b/VERSION index 6016e8ad..8ac28bf9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.6.0 +4.6.1 diff --git a/configure.ac b/configure.ac index e04f80ee..dc698f57 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/demo/Makefile.am b/demo/Makefile.am index d0f71ff5..9f178fb2 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/demo/Makefile.in b/demo/Makefile.in index 8020f3ac..d0e596b5 100644 --- a/demo/Makefile.in +++ b/demo/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/demo/Makefile_demo b/demo/Makefile_demo index 5e18a07e..14a2676f 100644 --- a/demo/Makefile_demo +++ b/demo/Makefile_demo @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/demo/Makefile_demo.in b/demo/Makefile_demo.in index 6bd15ecb..64c18559 100644 --- a/demo/Makefile_demo.in +++ b/demo/Makefile_demo.in @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/demo/ocilib_demo.c b/demo/ocilib_demo.c index 4251a200..59f6d8f1 100644 --- a/demo/ocilib_demo.c +++ b/demo/ocilib_demo.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/demo/ocilib_demo.cpp b/demo/ocilib_demo.cpp index f6bbe8e8..aa3b135b 100644 --- a/demo/ocilib_demo.cpp +++ b/demo/ocilib_demo.cpp @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * -* Copyright (c) 2007-2018 Vincent ROGIER +* Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1049,7 +1049,7 @@ void test_returning_array(void) ostring str; str += otext("Name"); - str += ((i + 1) + '0'); + str += static_cast((i + 1) + '0'); tab_str.push_back(str); tab_date.push_back(Date::SysDate()); @@ -1060,7 +1060,7 @@ void test_returning_array(void) ostring fileName; fileName += otext("File"); - fileName += ((i + 1) + '0'); + fileName += static_cast((i + 1) + '0'); File file(con, otext("Mydir"), fileName); tab_file.push_back(file); } diff --git a/demo/ocilib_demo.h b/demo/ocilib_demo.h index 75d381fd..3cf54c30 100644 --- a/demo/ocilib_demo.h +++ b/demo/ocilib_demo.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am index 35d20700..6e4a1a2c 100644 --- a/doc/html/Makefile.am +++ b/doc/html/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 29bc6237..1f918ef5 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/doxygen/Doxyfile.dox b/doxygen/Doxyfile.dox index 9ec0991a..4fa5ca4b 100644 --- a/doxygen/Doxyfile.dox +++ b/doxygen/Doxyfile.dox @@ -38,7 +38,7 @@ PROJECT_NAME = "OCILIB (C and C++ Driver for Oracle)" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 4.6.0 +PROJECT_NUMBER = 4.6.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/doxygen/Introduction.txt b/doxygen/Introduction.txt index 11145769..6628ef25 100644 --- a/doxygen/Introduction.txt +++ b/doxygen/Introduction.txt @@ -19,7 +19,7 @@ @section Version Version information -Current version : 4.6.0 +Current version : 4.6.1 @section Features Main features diff --git a/include/ocilib.h b/include/ocilib.h index 632b4a18..40efbb35 100644 --- a/include/ocilib.h +++ b/include/ocilib.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -92,7 +92,7 @@ extern "C" { #define OCILIB_MAJOR_VERSION 4 #define OCILIB_MINOR_VERSION 6 -#define OCILIB_REVISION_VERSION 0 +#define OCILIB_REVISION_VERSION 1 /* Import mode */ @@ -1081,9 +1081,8 @@ typedef unsigned int big_uint; #define OCI_11_2 1120 #define OCI_12_1 1210 #define OCI_12_2 1220 -#define OCI_18_1 1810 -#define OCI_18_2 1820 #define OCI_18_3 1830 +#define OCI_18_4 1840 /* versions extract macros */ diff --git a/include/ocilib.hpp b/include/ocilib.hpp index db70a1aa..784ba8d1 100644 --- a/include/ocilib.hpp +++ b/include/ocilib.hpp @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -240,9 +240,8 @@ enum OracleVersionValues Oracle11gR1 = OCI_11_1, Oracle11gR2 = OCI_11_2, Oracle12cR1 = OCI_12_1, - Oracle18cR1 = OCI_18_1, - Oracle18cR2 = OCI_18_2, - Oracle18cR3 = OCI_18_3 + Oracle18cR3 = OCI_18_3, + Oracle18cR4 = OCI_18_4 }; /** @@ -6617,9 +6616,6 @@ class Statement : public HandleHolder template void BindVector2(M &method, const ostring& name, std::vector &values, BindInfo::BindDirection mode, U subType, BindInfo::VectorType type); - template - unsigned int GetArraysize(BindInfo::VectorType type, std::vector &values); - template unsigned int Fetch(T callback); diff --git a/include/ocilib_core.hpp b/include/ocilib_core.hpp index ac6571ac..b9673e39 100644 --- a/include/ocilib_core.hpp +++ b/include/ocilib_core.hpp @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -450,7 +450,7 @@ class BindObject protected: - OCI_Statement *_pStatement; + const Statement& _statement; ostring _name; unsigned int _mode; }; @@ -463,14 +463,17 @@ class BindArray : public BindObject virtual ~BindArray(); template - void SetVector(std::vector & vector, unsigned int elemSize); - + void SetVector(std::vector & vector, bool isPlSqlTable, unsigned int elemSize); + template typename BindResolver::OutputType * GetData() const; void SetInData() override; void SetOutData() override; + unsigned int GetSize(); + unsigned int GetSizeForBindCall(); + private: class AbstractBindArrayObject @@ -481,6 +484,9 @@ class BindArray : public BindObject virtual void SetInData() = 0; virtual void SetOutData() = 0; virtual ostring GetName() = 0; + virtual bool IsHandleObject() = 0; + virtual unsigned int GetSize() = 0; + virtual unsigned int GetSizeForBindCall() = 0; }; template @@ -492,11 +498,14 @@ class BindArray : public BindObject typedef std::vector ObjectVector; typedef typename BindResolver::OutputType NativeType; - BindArrayObject(const Statement &statement, const ostring& name, ObjectVector &vector, unsigned int mode, unsigned int elemSize); + BindArrayObject(const Statement &statement, const ostring& name, ObjectVector &vector, bool isPlSqlTable, unsigned int mode, unsigned int elemSize); virtual ~BindArrayObject(); void SetInData() override; void SetOutData() override; ostring GetName() override; + bool IsHandleObject() override; + unsigned int GetSize() override; + unsigned int GetSizeForBindCall() override; operator ObjectVector & () const; operator NativeType * () const; @@ -506,10 +515,11 @@ class BindArray : public BindObject void AllocData(); void FreeData() const; - OCI_Statement *_pStatement; + const Statement& _statement; ostring _name; ObjectVector& _vector; NativeType *_data; + bool _isPlSqlTable; unsigned int _mode; unsigned int _elemCount; unsigned int _elemSize; @@ -584,7 +594,7 @@ class BindsHolder private: std::vector _bindObjects; - OCI_Statement * _pStatement; + const Statement& _statement; }; } diff --git a/include/ocilib_impl.hpp b/include/ocilib_impl.hpp index e7145e90..a5f93494 100644 --- a/include/ocilib_impl.hpp +++ b/include/ocilib_impl.hpp @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,11 +64,12 @@ typedef Long Blong; * @brief Resolve a bind input / output types * */ -template +template struct BindResolverType { typedef I InputType; typedef O OutputType; + static const bool IsHandle = B; }; /** @@ -77,9 +78,17 @@ struct BindResolverType * */ template -struct BindResolverScalarType : BindResolverType {}; +struct BindResolverScalarType : BindResolverType {}; + +/** +* +* @brief Simplified resolver for handle types +* +*/ +template +struct BindResolverHandleType : BindResolverType {}; -template<> struct BindResolver : BindResolverType{}; +template<> struct BindResolver : BindResolverType{}; template<> struct BindResolver : BindResolverScalarType{}; template<> struct BindResolver : BindResolverScalarType{}; template<> struct BindResolver : BindResolverScalarType{}; @@ -88,21 +97,21 @@ template<> struct BindResolver : BindResolverScalarType{}; template<> struct BindResolver : BindResolverScalarType{}; template<> struct BindResolver : BindResolverScalarType{}; template<> struct BindResolver : BindResolverScalarType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; -template<> struct BindResolver : BindResolverType{}; +template<> struct BindResolver : BindResolverType{}; +template<> struct BindResolver : BindResolverType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; +template<> struct BindResolver : BindResolverHandleType{}; /** * @brief Allow resolving a the C API numeric enumerated type from a C++ type @@ -174,19 +183,20 @@ inline unsigned int ComputeCharMaxSize(Environment::CharsetMode charsetMode) if (charsetMode == Environment::CharsetAnsi) { #ifdef _MSC_VER +#pragma warning(push) #pragma warning(disable: 4996) #endif char *str = getenv("NLS_LANG"); #ifdef _MSC_VER -#pragma warning(default: 4996) +#pragma warning(pop) #endif if (str) { std::string nlsLang = str; - for (int i = 0; i < nlsLang.size(); ++i) + for (size_t i = 0; i < nlsLang.size(); ++i) { nlsLang[i] = static_cast(toupper(nlsLang[i])); } @@ -507,6 +517,11 @@ Handle * HandleHolder::GetHandle() const template void HandleHolder::Acquire(T handle, HandleFreeFunc handleFreefunc, SmartHandleFreeNotifyFunc freeNotifyFunc, Handle *parent) { + if (_smartHandle && _smartHandle->GetHandle() == handle) + { + return; + } + Release(); if (handle) @@ -4565,7 +4580,7 @@ inline Raw Long::GetContent() const * BindObject * --------------------------------------------------------------------------------------------- */ -inline BindObject::BindObject(const Statement &statement, const ostring& name, unsigned int mode) : _pStatement(statement), _name(name), _mode(mode) +inline BindObject::BindObject(const Statement &statement, const ostring& name, unsigned int mode) : _statement(statement), _name(name), _mode(mode) { } @@ -4580,7 +4595,7 @@ inline ostring BindObject::GetName() const inline Statement BindObject::GetStatement() const { - return Statement(_pStatement); + return _statement; } inline unsigned int BindObject::GetMode() const @@ -4598,9 +4613,9 @@ inline BindArray::BindArray(const Statement &statement, const ostring& name, uns } template -void BindArray::SetVector(std::vector & vector, unsigned int elemSize) +void BindArray::SetVector(std::vector & vector, bool isPlSqlTable, unsigned int elemSize) { - _object = new BindArrayObject(GetStatement(), GetName(), vector, GetMode(), elemSize); + _object = new BindArrayObject(_statement, GetName(), vector, isPlSqlTable, GetMode(), elemSize); } inline BindArray::~BindArray() @@ -4616,7 +4631,8 @@ typename BindResolver::OutputType * BindArray::GetData() const inline void BindArray::SetInData() { - if (GetMode() & OCI_BDM_IN) + + if (GetMode() & OCI_BDM_IN || _object->IsHandleObject()) { _object->SetInData(); } @@ -4630,9 +4646,19 @@ inline void BindArray::SetOutData() } } +inline unsigned int BindArray::GetSize() +{ + return _object ? _object->GetSize() : _statement.GetBindArraySize(); +} + +inline unsigned int BindArray::GetSizeForBindCall() +{ + return _object ? _object->GetSizeForBindCall() : 0; +} + template -BindArray::BindArrayObject::BindArrayObject(const Statement &statement, const ostring& name, ObjectVector &vector, unsigned int mode, unsigned int elemSize) - : _pStatement(statement), _name(name), _vector(vector), _data(nullptr), _mode(mode), _elemCount(statement.GetBindArraySize()), _elemSize(elemSize) +BindArray::BindArrayObject::BindArrayObject(const Statement &statement, const ostring& name, ObjectVector &vector, bool isPlSqlTable, unsigned int mode, unsigned int elemSize) + : _statement(statement), _name(name), _vector(vector), _data(nullptr), _isPlSqlTable(isPlSqlTable), _mode(mode), _elemCount(GetSize()), _elemSize(elemSize) { AllocData(); } @@ -4679,7 +4705,7 @@ void BindArray::BindArrayObject::SetInData() typename ObjectVector::iterator it, it_end; unsigned int index = 0; - unsigned int currElemCount = Check(OCI_BindArrayGetSize(_pStatement)); + unsigned int currElemCount = GetSize(); for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; ++it, ++index) { @@ -4693,7 +4719,7 @@ inline void BindArray::BindArrayObject::SetInData() std::vector::iterator it, it_end; unsigned int index = 0; - unsigned int currElemCount = Check(OCI_BindArrayGetSize(_pStatement)); + unsigned int currElemCount = GetSize(); for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; ++it, ++index) { @@ -4709,7 +4735,7 @@ inline void BindArray::BindArrayObject::SetInData() std::vector::iterator it, it_end; unsigned int index = 0; - unsigned int currElemCount = Check(OCI_BindArrayGetSize(_pStatement)); + unsigned int currElemCount = GetSize(); for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; ++it, ++index) { @@ -4720,7 +4746,7 @@ inline void BindArray::BindArrayObject::SetInData() memcpy(_data + (_elemSize * index), &value[0], value.size()); } - OCI_BindSetDataSizeAtPos(OCI_GetBind2(_pStatement, GetName().c_str()), index + 1, static_cast(value.size())); + OCI_BindSetDataSizeAtPos(OCI_GetBind2(_statement, GetName().c_str()), index + 1, static_cast(value.size())); } } @@ -4730,7 +4756,7 @@ void BindArray::BindArrayObject::SetOutData() typename ObjectVector::iterator it, it_end; unsigned int index = 0; - unsigned int currElemCount = Check(OCI_BindArrayGetSize(_pStatement)); + unsigned int currElemCount = GetSize(); for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; ++it, ++index) { @@ -4740,15 +4766,33 @@ void BindArray::BindArrayObject::SetOutData() } } +template<> +inline void BindArray::BindArrayObject::SetOutData() +{ + std::vector::iterator it, it_end; + + OCI_Bind *pBind = Check(OCI_GetBind2(_statement, GetName().c_str())); + + unsigned int index = 0; + unsigned int currElemCount = GetSize(); + + for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; ++it, ++index) + { + otext *currData = _data + (_elemSize * sizeof(otext) * index); + + (*it).assign(currData, currData + Check(OCI_BindGetDataSizeAtPos(pBind, index + 1))); + } +} + template<> inline void BindArray::BindArrayObject::SetOutData() { std::vector::iterator it, it_end; - OCI_Bind *pBind = Check(OCI_GetBind2(_pStatement, GetName().c_str())); + OCI_Bind *pBind = Check(OCI_GetBind2(_statement, GetName().c_str())); unsigned int index = 0; - unsigned int currElemCount = Check(OCI_BindArrayGetSize(_pStatement)); + unsigned int currElemCount = GetSize(); for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; ++it, ++index) { @@ -4764,6 +4808,24 @@ ostring BindArray::BindArrayObject::GetName() return _name; } +template +bool BindArray::BindArrayObject::IsHandleObject() +{ + return BindResolver::IsHandle; +} + +template +unsigned int BindArray::BindArrayObject::GetSize() +{ + return _isPlSqlTable ? static_cast(_vector.size()) : _statement.GetBindArraySize(); +} + +template +unsigned int BindArray::BindArrayObject::GetSizeForBindCall() +{ + return _isPlSqlTable ? static_cast(_vector.size()) : 0; +} + template BindArray::BindArrayObject::operator ObjectVector & () const { @@ -4806,7 +4868,7 @@ void BindObjectAdaptor::SetOutData() { if (GetMode() & OCI_BDM_OUT) { - size_t size = Check(OCI_BindGetDataSize(Check(OCI_GetBind2(_pStatement, _name.c_str())))); + size_t size = Check(OCI_BindGetDataSize(Check(OCI_GetBind2(_statement, _name.c_str())))); _object.assign(_data, _data + size); } @@ -4899,7 +4961,7 @@ inline void BindTypeAdaptor::SetOutData() * BindsHolder * --------------------------------------------------------------------------------------------- */ -inline BindsHolder::BindsHolder(const Statement &statement) : _bindObjects(), _pStatement(statement) +inline BindsHolder::BindsHolder(const Statement &statement) : _bindObjects(), _statement(statement) { } @@ -4923,7 +4985,7 @@ inline void BindsHolder::Clear() inline void BindsHolder::AddBindObject(BindObject *bindObject) { - if (Check(OCI_IsRebindingAllowed(_pStatement))) + if (Check(OCI_IsRebindingAllowed(_statement))) { std::vector::iterator it, it_end; @@ -5227,9 +5289,9 @@ template void Statement::BindVector1(M &method, const ostring& name, std::vector &values, BindInfo::BindDirection mode, BindInfo::VectorType type) { BindArray * bnd = new BindArray(*this, name, mode); - bnd->SetVector(values, sizeof(typename BindResolver::OutputType)); + bnd->SetVector(values, type == BindInfo::AsPlSqlTable, sizeof(typename BindResolver::OutputType)); - boolean res = method(*this, name.c_str(), bnd->GetData(), GetArraysize(type, values)); + boolean res = method(*this, name.c_str(), bnd->GetData(), bnd->GetSizeForBindCall()); if (res) { @@ -5249,9 +5311,9 @@ template void Statement::BindVector2(M &method, const ostring& name, std::vector &values, BindInfo::BindDirection mode, U subType, BindInfo::VectorType type) { BindArray * bnd = new BindArray(*this, name, mode); - bnd->SetVector(values, sizeof(typename BindResolver::OutputType)); + bnd->SetVector(values, type == BindInfo::AsPlSqlTable, sizeof(typename BindResolver::OutputType)); - boolean res = method(*this, name.c_str(), bnd->GetData(), subType, GetArraysize(type, values)); + boolean res = method(*this, name.c_str(), bnd->GetData(), subType, bnd->GetSizeForBindCall()); if (res) { @@ -5267,12 +5329,6 @@ void Statement::BindVector2(M &method, const ostring& name, std::vector &valu Check(res); } -template -unsigned int Statement::GetArraysize(BindInfo::VectorType type, std::vector &values) -{ - return type == BindInfo::AsPlSqlTable ? static_cast(values.size()) : 0; -} - template<> inline void Statement::Bind(const ostring& name, bool &value, BindInfo::BindDirection mode) { @@ -5639,9 +5695,9 @@ template<> inline void Statement::Bind(const ostring& name, std::vector &values, unsigned int maxSize, BindInfo::BindDirection mode, BindInfo::VectorType type) { BindArray * bnd = new BindArray(*this, name, mode); - bnd->SetVector(values, maxSize+1); + bnd->SetVector(values, type == BindInfo::AsPlSqlTable, maxSize+1); - boolean res = OCI_BindArrayOfStrings(*this, name.c_str(), bnd->GetData(), maxSize, GetArraysize(type, values)); + boolean res = OCI_BindArrayOfStrings(*this, name.c_str(), bnd->GetData(), maxSize, bnd->GetSizeForBindCall()); if (res) { @@ -5667,9 +5723,9 @@ template<> inline void Statement::Bind(const ostring& name, std::vector &values, unsigned int maxSize, BindInfo::BindDirection mode, BindInfo::VectorType type) { BindArray * bnd = new BindArray(*this, name, mode); - bnd->SetVector(values, maxSize); + bnd->SetVector(values, type == BindInfo::AsPlSqlTable, maxSize); - boolean res = OCI_BindArrayOfRaws(*this, name.c_str(), bnd->GetData(), maxSize, GetArraysize(type, values)); + boolean res = OCI_BindArrayOfRaws(*this, name.c_str(), bnd->GetData(), maxSize, bnd->GetSizeForBindCall()); if (res) { diff --git a/proj/dll/main.c b/proj/dll/main.c index 858c79da..24f0524c 100644 --- a/proj/dll/main.c +++ b/proj/dll/main.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proj/dll/main.rc b/proj/dll/main.rc index 51ae7912..5cf0aca3 100644 --- a/proj/dll/main.rc +++ b/proj/dll/main.rc @@ -2,8 +2,8 @@ #include "resource.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,6,0,0 - PRODUCTVERSION 4,6,0,0 + FILEVERSION 4,6,1,0 + PRODUCTVERSION 4,6,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -20,11 +20,11 @@ BEGIN BEGIN VALUE "CompanyName", "Vincent Rogier" VALUE "FileDescription", "Open source C driver for Oracle databases" - VALUE "FileVersion", "4.6.0.0" + VALUE "FileVersion", "4.6.1.0" VALUE "InternalName", "OCILIB" - VALUE "LegalCopyright", "Copyright © 2007-2018" + VALUE "LegalCopyright", "Copyright © 2007-2019" VALUE "ProductName", "OCILIB (C driver for Oracle)" - VALUE "ProductVersion", "4.6.0.0" + VALUE "ProductVersion", "4.6.1.0" END END BLOCK "VarFileInfo" @@ -34,8 +34,8 @@ BEGIN END IDR_VERSION VERSIONINFO - FILEVERSION 4,6,0,0 - PRODUCTVERSION 4,6,0,0 + FILEVERSION 4,6,1,0 + PRODUCTVERSION 4,6,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -52,12 +52,12 @@ BEGIN BEGIN VALUE "CompanyName", "Vincent Rogier" VALUE "FileDescription", "Open source C driver for Oracle databases" - VALUE "FileVersion", "4.6.0.0" + VALUE "FileVersion", "4.6.1.0" VALUE "InternalName", "OCILIB.dll" - VALUE "LegalCopyright", "Copyright © 2007-2018" + VALUE "LegalCopyright", "Copyright © 2007-2019" VALUE "OriginalFilename", "OCILIB.dll" VALUE "ProductName", "OCILIB (C driver for Oracle)" - VALUE "ProductVersion", "4.6.0.0" + VALUE "ProductVersion", "4.6.1.0" END END BLOCK "VarFileInfo" diff --git a/proj/dll/ocilib.props b/proj/dll/ocilib.props new file mode 100644 index 00000000..5f534de6 --- /dev/null +++ b/proj/dll/ocilib.props @@ -0,0 +1,14 @@ + + + + + false + + + + + + $(XPDeprecationWarning) + + + \ No newline at end of file diff --git a/proj/dll/ocilib_dll_vs2017.vcxproj b/proj/dll/ocilib_dll_vs2017.vcxproj index add09313..08e01ae9 100644 --- a/proj/dll/ocilib_dll_vs2017.vcxproj +++ b/proj/dll/ocilib_dll_vs2017.vcxproj @@ -54,15 +54,19 @@ + + + + diff --git a/reconf b/reconf index 6be59408..c8b7a476 100755 --- a/reconf +++ b/reconf @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2018 Vincent Rogier +# Copyright (C) 2007-2019 Vincent Rogier # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/Makefile.am b/src/Makefile.am index 4f351d9d..80190548 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/Makefile.in b/src/Makefile.in index f4dfff98..01c11d95 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (c) 2007-2018 Vincent ROGIER +# Copyright (c) 2007-2019 Vincent ROGIER # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/agent.c b/src/agent.c index 4f029aa4..8f3bc3bc 100644 --- a/src/agent.c +++ b/src/agent.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/array.c b/src/array.c index e80d1614..d2ff2d51 100644 --- a/src/array.c +++ b/src/array.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/bind.c b/src/bind.c index 376791f7..ee6bedb9 100644 --- a/src/bind.c +++ b/src/bind.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/callback.c b/src/callback.c index b1c19d3c..82b1eae4 100644 --- a/src/callback.c +++ b/src/callback.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/collection.c b/src/collection.c index 693d4066..efaee2c2 100644 --- a/src/collection.c +++ b/src/collection.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/column.c b/src/column.c index 6b36c2f0..852f4b03 100644 --- a/src/column.c +++ b/src/column.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -261,6 +261,8 @@ boolean OCI_ColumnDescribe col->props |= OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL; } + #if OCI_VERSION_COMPILE >= OCI_18_3 + if (value & OCI_ATTR_COL_PROPERTY_IS_LPART) { col->props |= OCI_CPF_IS_LPART; @@ -270,6 +272,8 @@ boolean OCI_ColumnDescribe { col->props |= OCI_CPF_IS_CONID; } + + #endif } } diff --git a/src/connection.c b/src/connection.c index 41868c64..f6a69324 100644 --- a/src/connection.c +++ b/src/connection.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1912,11 +1912,11 @@ boolean OCI_API OCI_SetTimeout OCI_RETVAL = OCI_STATUS; } - #if OCI_VERSION_COMPILE >= OCI_18_1 + #if OCI_VERSION_COMPILE >= OCI_18_3 case OCI_NTO_CALL: { - if (OCILib.version_runtime >= OCI_12_1) + if (OCILib.version_runtime >= OCI_18_3) { OCI_SET_ATTRIB(OCI_HTYPE_SVCCTX, OCI_ATTR_CALL_TIMEOUT, con->cxt, &timeout, sizeof(timeout)) OCI_RETVAL = OCI_STATUS; @@ -1966,11 +1966,11 @@ unsigned int OCI_API OCI_GetTimeout OCI_GET_ATTRIB(OCI_HTYPE_SERVER, OCI_ATTR_RECEIVE_TIMEOUT, con->svr, &timeout, sizeof(timeout)) } - #if OCI_VERSION_COMPILE >= OCI_18_1 + #if OCI_VERSION_COMPILE >= OCI_18_3 case OCI_NTO_CALL: { - if (OCILib.version_runtime >= OCI_12_1) + if (OCILib.version_runtime >= OCI_18_3) { OCI_GET_ATTRIB(OCI_HTYPE_SVCCTX, OCI_ATTR_CALL_TIMEOUT, con->cxt, &timeout, sizeof(timeout)) } diff --git a/src/date.c b/src/date.c index 46512b80..aacc71ce 100644 --- a/src/date.c +++ b/src/date.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/define.c b/src/define.c index 1358fbfc..b62c955e 100644 --- a/src/define.c +++ b/src/define.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/dequeue.c b/src/dequeue.c index 5524062d..6e022585 100644 --- a/src/dequeue.c +++ b/src/dequeue.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/dirpath.c b/src/dirpath.c index aaac783c..a643d0e5 100644 --- a/src/dirpath.c +++ b/src/dirpath.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/element.c b/src/element.c index 4aa00688..a00dc047 100644 --- a/src/element.c +++ b/src/element.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/enqueue.c b/src/enqueue.c index e2945a21..4d199772 100644 --- a/src/enqueue.c +++ b/src/enqueue.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/error.c b/src/error.c index 628b558d..e300a988 100644 --- a/src/error.c +++ b/src/error.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/event.c b/src/event.c index dab5b076..df299546 100644 --- a/src/event.c +++ b/src/event.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/exception.c b/src/exception.c index 507c74ed..d3184d33 100644 --- a/src/exception.c +++ b/src/exception.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/file.c b/src/file.c index 5e6c149f..d09a8b92 100644 --- a/src/file.c +++ b/src/file.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/format.c b/src/format.c index 07bccbbe..1bac2419 100644 --- a/src/format.c +++ b/src/format.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/handle.c b/src/handle.c index d1557789..8aa46b7e 100644 --- a/src/handle.c +++ b/src/handle.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/hash.c b/src/hash.c index 7b3f6479..2e8ad642 100644 --- a/src/hash.c +++ b/src/hash.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/interval.c b/src/interval.c index 8ac00a2a..7094257e 100644 --- a/src/interval.c +++ b/src/interval.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/iterator.c b/src/iterator.c index a0489ef4..c76ae65b 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/library.c b/src/library.c index c7e4c577..1bda3c1c 100644 --- a/src/library.c +++ b/src/library.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/list.c b/src/list.c index 43c2513e..6b859bbd 100644 --- a/src/list.c +++ b/src/list.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/lob.c b/src/lob.c index e0924b92..5c08fb8a 100644 --- a/src/lob.c +++ b/src/lob.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/long.c b/src/long.c index 6a9fa52e..de51442f 100644 --- a/src/long.c +++ b/src/long.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/memory.c b/src/memory.c index 0b81552c..b01a7826 100644 --- a/src/memory.c +++ b/src/memory.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/msg.c b/src/msg.c index 3743809b..0fe2b9ba 100644 --- a/src/msg.c +++ b/src/msg.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/mutex.c b/src/mutex.c index 2aa6aaa2..68c46fe1 100644 --- a/src/mutex.c +++ b/src/mutex.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/number.c b/src/number.c index fa3939f0..44b520f9 100644 --- a/src/number.c +++ b/src/number.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/object.c b/src/object.c index 20b0757f..af62d041 100644 --- a/src/object.c +++ b/src/object.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/oci_api.h b/src/oci_api.h index d7c80a6d..5ecdffcb 100644 --- a/src/oci_api.h +++ b/src/oci_api.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/oci_defs.h b/src/oci_defs.h index 1ea81b9a..fc80ef83 100644 --- a/src/oci_defs.h +++ b/src/oci_defs.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/oci_import.h b/src/oci_import.h index 92a473ab..844ad1e3 100644 --- a/src/oci_import.h +++ b/src/oci_import.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/oci_loader.h b/src/oci_loader.h index cbddd8a8..3ea2f661 100644 --- a/src/oci_loader.h +++ b/src/oci_loader.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/oci_types.h b/src/oci_types.h index e1e0c0b6..0d17f5ba 100644 --- a/src/oci_types.h +++ b/src/oci_types.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/ocilib_checks.h b/src/ocilib_checks.h index 9ab59657..c9ce2bda 100644 --- a/src/ocilib_checks.h +++ b/src/ocilib_checks.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/ocilib_defs.h b/src/ocilib_defs.h index 535ee7f8..334aebd7 100644 --- a/src/ocilib_defs.h +++ b/src/ocilib_defs.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,11 +41,16 @@ #else - #if defined(OCI_FNCODE_LOBGETCHUNKSIZE) /* = OCI_18_3 */ + #if defined(OCI_FNCODE_SERVERRELEASE2) /* = OCI_18_3 */ #define OCI_VERSION_COMPILE OCI_18_3 #define OCI_VERSION_RUNTIME OCI_18_3 + #elif defined(OCI_FNCODE_LOBGETCHUNKSIZE) /* = OCI_12_2 */ + + #define OCI_VERSION_COMPILE OCI_12_2 + #define OCI_VERSION_RUNTIME OCI_12_2 + #elif defined(OCI_FNCODE_BINDBYPOS2) /* = OCI_12_1 */ #define OCI_VERSION_COMPILE OCI_12_1 diff --git a/src/ocilib_internal.h b/src/ocilib_internal.h index 7508f807..0a0b9895 100644 --- a/src/ocilib_internal.h +++ b/src/ocilib_internal.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/ocilib_types.h b/src/ocilib_types.h index 8d8e0709..63e22e7c 100644 --- a/src/ocilib_types.h +++ b/src/ocilib_types.h @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pool.c b/src/pool.c index 7f36e1ae..bc1c953c 100644 --- a/src/pool.c +++ b/src/pool.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/queue.c b/src/queue.c index 541bac7a..22b94eff 100644 --- a/src/queue.c +++ b/src/queue.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/ref.c b/src/ref.c index 62964c0b..29a80496 100644 --- a/src/ref.c +++ b/src/ref.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/resultset.c b/src/resultset.c index 34b0395d..418914ac 100644 --- a/src/resultset.c +++ b/src/resultset.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/statement.c b/src/statement.c index 9bba8f6d..66cb4462 100644 --- a/src/statement.c +++ b/src/statement.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/string.c b/src/string.c index 8ae00423..e0305c78 100644 --- a/src/string.c +++ b/src/string.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/subscription.c b/src/subscription.c index b99913fd..4459c9de 100644 --- a/src/subscription.c +++ b/src/subscription.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/thread.c b/src/thread.c index 037abe7b..d892c85a 100644 --- a/src/thread.c +++ b/src/thread.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/threadkey.c b/src/threadkey.c index 0788efe3..7298db11 100644 --- a/src/threadkey.c +++ b/src/threadkey.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/timestamp.c b/src/timestamp.c index a1e3ffa3..9a640d94 100644 --- a/src/timestamp.c +++ b/src/timestamp.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/transaction.c b/src/transaction.c index 1f8590aa..eb185333 100644 --- a/src/transaction.c +++ b/src/transaction.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/typeinfo.c b/src/typeinfo.c index 4aceef7d..60fe7853 100644 --- a/src/typeinfo.c +++ b/src/typeinfo.c @@ -3,7 +3,7 @@ * * Website: http://www.ocilib.net * - * Copyright (c) 2007-2018 Vincent ROGIER + * Copyright (c) 2007-2019 Vincent ROGIER * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.