Skip to content

Commit

Permalink
Merge pull request #327 from vrogier/develop-v4.7.6
Browse files Browse the repository at this point in the history
Develop v4.7.6
  • Loading branch information
vrogier authored Feb 9, 2023
2 parents ce6a770 + 2ca30a8 commit 3ce8acc
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 41 deletions.
15 changes: 13 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2023-02-08 Version 4.7.6 Vincent Rogier [email protected]

* Fixes (C API)

- Issue 326: OCI_GetTimeout() always returns 0 since v4.7.0

* Fixes (C++ API)

- Issue 325: ocilib::Lob::GetConnection() does not compile anymore since v4.7.5


2023-02-06 Version 4.7.5 Vincent Rogier [email protected]

* Changes (C API)
Expand Down Expand Up @@ -26,7 +37,7 @@
- Issue 313: OCI_GetString() returns NULL for CLOB columns is the CLOB row value was filled with empty_clob()
- Issue 314: OCI_BindSetCharsetForm() is not accessible since v4.7.0
- ISsue 316: OCI_DequeueGet() returns messages with OCI_Object payloads that can have NULL properties while being NOT NULL when queued
- ISsue 317: OCI_SubscriptionRegister() generates a segfault on failure
- ISsue 323: OCI_SubscriptionRegister() generates a segfault on failure

* Fixes (C++ API)

Expand Down Expand Up @@ -284,7 +295,7 @@
* Fixed Oracle minor and revision version when Oracle version >= 18c (due to breaking in OCI API)

* Added new version constants
- C API: added OCI_18_1, OCI_18_2, OCI_18_3 v
- C API: added OCI_18_1, OCI_18_2, OCI_18_3
- C++ API: extended OracleVersionValues with Oracle18cR1, Oracle18cR2, Oracle18cR3

* Extended Column property flags:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.7.5
4.7.6
2 changes: 1 addition & 1 deletion doxygen/Doxyfile.dox
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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.7.5
PROJECT_NUMBER = 4.7.6

# 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
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Introduction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@section Version Version information

Current version : <b>4.7.5</b>
Current version : <b>4.7.6</b>

@section Features Main features

Expand Down
8 changes: 6 additions & 2 deletions include/ocilibc/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2388,6 +2388,10 @@ OCI_SYM_PUBLIC const otext * OCI_API OCI_GetSQLVerb
* - Each OCI_Execute() call may be preceded by an update of the program
* variables (for INSERTs for example)
*
* @warning
* Between re-execution of same SQL statetement, use OCI_BindSetNullAtPos() / OCI_BindSetNull() and OCI_BindSetNullAtPos() / OCI_BindSetNotNullAtPos()
* to update the NULL / NOT NULL status of host variables
*
* Bindings can be:
* - IN (host variable are not used anymore after statement execution)
* - OUT (host variable are set during statement execution)
Expand Down Expand Up @@ -13460,7 +13464,7 @@ OCI_SYM_PUBLIC boolean OCI_DescribeFmt
*
* OCILIB uses hash tables internally for index/name columns mapping.
*
* OCILIB makes public its hash table’s implementation public for general purpose
* OCILIB makes public its hash tables implementation public for general purpose
* uses.
*
* OCI_HashTable objects manage string keys / values that can be :
Expand Down Expand Up @@ -15996,7 +16000,7 @@ OCI_SYM_PUBLIC boolean OCI_API OCI_DequeueSetAgentList
* @warning
* The return value is valid only until:
* - OCIDequeueListen() is called again
* - OCI_DequeueFree(à is called to free the Dequeue object
* - OCI_DequeueFree() is called to free the Dequeue object
* So Do not store the handle value across calls to OCIDequeueListen()
*
* @return
Expand Down
2 changes: 1 addition & 1 deletion include/ocilibc/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

#define OCILIB_MAJOR_VERSION 4
#define OCILIB_MINOR_VERSION 7
#define OCILIB_REVISION_VERSION 5
#define OCILIB_REVISION_VERSION 6

/* Import mode */

Expand Down
3 changes: 3 additions & 0 deletions include/ocilibcpp/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ namespace ocilib
friend class Event;
friend class Column;

template<class, int>
friend class Lob;

public:

/**
Expand Down
6 changes: 3 additions & 3 deletions nuget/ocilib.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata minClientVersion="3.5">
<id>ocilib</id>
<version>4.7.5</version>
<version>4.7.6</version>
<title>Ocilib Driver for Oracle databases</title>
<summary>
OCILIB is an open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Expand All @@ -18,7 +18,7 @@ It requires Oracle Client libraries (Regular or instant client).
</description>
<authors>Vincent Rogier</authors>
<owners>Vincentt Rogier</owners>
<releaseNotes>https://github.com/vrogier/ocilib/releases/tag/v4.7.5</releaseNotes>
<releaseNotes>https://github.com/vrogier/ocilib/releases/tag/v4.7.6</releaseNotes>
<projectUrl>https://github.com/vrogier/ocilib</projectUrl>
<iconUrl>http://ocilib.net/images/logo-160x120.png</iconUrl>
<icon>images\logo-160x120.png</icon>
Expand All @@ -27,7 +27,7 @@ It requires Oracle Client libraries (Regular or instant client).
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
<copyright>Copyright 2007-2023 Vincent Rogier</copyright>
<tags>Oracle SQL C C++ OCI API Access Driver</tags>
<repository type="git" url="https://github.com/vrogier/ocilib.git" commit="cf8865baf269b3357c3935a15166e839d9d9b2c2" />
<repository type="git" url="https://github.com/vrogier/ocilib.git" commit="971f6142a73e590ff659573ffc4aadf23d3dafc6" />
</metadata>
<files>
<file src="ocilib.props" target="build\native" />
Expand Down
2 changes: 1 addition & 1 deletion ocilib.pc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ includedir=${prefix}/include
Name: ocilib
Description: OCILIB is an open source and cross platform Oracle Driver that delivers efficient access to Oracle databases.
URL: http://www.ocilib.net
Version: 4.7.5
Version: 4.7.6
Libs: -L${exec_prefix}/lib -locilib
Cflags: -I${prefix}/include

20 changes: 10 additions & 10 deletions proj/dll/main.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "resource.h"

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,7,5,0
PRODUCTVERSION 4,7,5,0
FILEVERSION 4,7,6,0
PRODUCTVERSION 4,7,6,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -20,11 +20,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "Vincent Rogier"
VALUE "FileDescription", "Open source C driver for Oracle databases"
VALUE "FileVersion", "4.7.5.0"
VALUE "FileVersion", "4.7.6.0"
VALUE "InternalName", "OCILIB"
VALUE "LegalCopyright", "Copyright � 2007-2021"
VALUE "LegalCopyright", "Copyright � 2007-2023"
VALUE "ProductName", "OCILIB (C driver for Oracle)"
VALUE "ProductVersion", "4.7.5.0"
VALUE "ProductVersion", "4.7.6.0"
END
END
BLOCK "VarFileInfo"
Expand All @@ -34,8 +34,8 @@ BEGIN
END

IDR_VERSION VERSIONINFO
FILEVERSION 4,7,5,0
PRODUCTVERSION 4,7,5,0
FILEVERSION 4,7,6,0
PRODUCTVERSION 4,7,6,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -52,12 +52,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Vincent Rogier"
VALUE "FileDescription", "Open source C driver for Oracle databases"
VALUE "FileVersion", "4.7.5.0"
VALUE "FileVersion", "4.7.6.0"
VALUE "InternalName", "OCILIB.dll"
VALUE "LegalCopyright", "Copyright � 2007-2021"
VALUE "LegalCopyright", "Copyright � 2007-2023"
VALUE "OriginalFilename", "OCILIB.dll"
VALUE "ProductName", "OCILIB (C driver for Oracle)"
VALUE "ProductVersion", "4.7.5.0"
VALUE "ProductVersion", "4.7.6.0"
END
END
BLOCK "VarFileInfo"
Expand Down
12 changes: 6 additions & 6 deletions src/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -2374,20 +2374,20 @@ unsigned int OcilibConnectionGetTimeout
{
case OCI_NTO_SEND:
{
CHECK_ATTRIB_SET
CHECK_ATTRIB_GET
(
OCI_HTYPE_SERVER, OCI_ATTR_SEND_TIMEOUT,
con->svr, &timeout, sizeof(timeout),
con->svr, &timeout, NULL,
con->err
)
break;
}
case OCI_NTO_RECEIVE:
{
CHECK_ATTRIB_SET
CHECK_ATTRIB_GET
(
OCI_HTYPE_SERVER, OCI_ATTR_RECEIVE_TIMEOUT,
con->svr, &timeout, sizeof(timeout),
con->svr, &timeout, NULL,
con->err
)
break;
Expand All @@ -2399,10 +2399,10 @@ unsigned int OcilibConnectionGetTimeout
{
if (Env.version_runtime >= OCI_18_3)
{
CHECK_ATTRIB_SET
CHECK_ATTRIB_GET
(
OCI_HTYPE_SVCCTX, OCI_ATTR_CALL_TIMEOUT,
con->cxt, &timeout, sizeof(timeout),
con->cxt, &timeout, NULL,
con->err
)
}
Expand Down
5 changes: 2 additions & 3 deletions src/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@

#ifdef OCI_IMPORT_RUNTIME

/* for runtime loading, set compile time version to the highest minimum
version needed by OCILIB encapsulation of OCI */
/* for runtime loading, set compile time version to the highest known OCI version */

#define OCI_VERSION_COMPILE OCI_18_1
#define OCI_VERSION_COMPILE OCI_21_3

/* set runtime version to unknown, it will be guessed from symbols loading */

Expand Down
35 changes: 25 additions & 10 deletions tests/TestREportedIssuesCppApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ TEST(ReportedIssuesCppApi, Issue309_NoDataFoundPlsqlWithError)

try
{
ocilib::Environment::Initialize();
Environment::Initialize();

Connection con(DBS, USR, PWD);
ocilib::Statement stmt(con);
Statement stmt(con);

const ocilib::ostring cmd =
const ostring cmd =
OTEXT
(
R"(
Expand Down Expand Up @@ -101,10 +101,10 @@ TEST(ReportedIssuesCppApi, Issue309_NoDataFoundSqlCallingPlsqlWithoutError)
auto isNull{ false };
try
{
ocilib::Environment::Initialize();
Environment::Initialize();

Connection con(DBS, USR, PWD);
ocilib::Statement stmt(con);
Statement stmt(con);

stmt.Execute(OTEXT("select TestPackageIssue309.ReturnNumber() from dual"));
auto resultset = stmt.GetResultset();
Expand All @@ -114,7 +114,7 @@ TEST(ReportedIssuesCppApi, Issue309_NoDataFoundSqlCallingPlsqlWithoutError)
counter++;
}
}
catch (const ocilib::Exception& e)
catch (const ocilib::Exception&)
{
exceptionOccured = true;
}
Expand All @@ -137,10 +137,10 @@ TEST(ReportedIssuesCppApi, Issue309_NoDataFoundSqlWithoutError)
auto counter{ 0 };
try
{
ocilib::Environment::Initialize();
Environment::Initialize();

Connection con(DBS, USR, PWD);
ocilib::Statement stmt(con);
Statement stmt(con);

stmt.Execute(OTEXT(" select code, name from TestTableIssue309_3"));
auto resultset = stmt.GetResultset();
Expand Down Expand Up @@ -168,10 +168,10 @@ TEST(ReportedIssuesCppApi, Issue314)

try
{
ocilib::Environment::Initialize();
Environment::Initialize();

Connection con(DBS, USR, PWD);
ocilib::Statement stmt(con);
Statement stmt(con);

int value = 2;

Expand All @@ -189,4 +189,19 @@ TEST(ReportedIssuesCppApi, Issue314)
ASSERT_FALSE(exceptionOccured);

Environment::Cleanup();
}

TEST(ReportedIssuesCppApi, Issue325)
{
Environment::Initialize();

Connection con(DBS, USR, PWD);

Clob clob(con);

// to test it compiles
auto clobConn = clob.GetConnection();

Environment::Cleanup();

}
22 changes: 22 additions & 0 deletions tests/TestReportedIssuesCApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,4 +678,26 @@ TEST(ReportedIssuesCApi, Issue316)
ASSERT_TRUE(OCI_Cleanup());
}

TEST(ReportedIssuesCApi, Issue326)
{
ASSERT_TRUE(OCI_Initialize(nullptr, HOME, OCI_ENV_DEFAULT));

const auto conn = OCI_ConnectionCreate(DBS, USR, PWD, OCI_SESSION_DEFAULT);

ASSERT_NE(nullptr, conn);

ASSERT_TRUE(OCI_SetTimeout(conn, OCI_NTO_SEND, 1000));
ASSERT_TRUE(OCI_SetTimeout(conn, OCI_NTO_RECEIVE, 2000));
ASSERT_TRUE(OCI_SetTimeout(conn, OCI_NTO_CALL, 3000));

ASSERT_EQ(1000, OCI_GetTimeout(conn, OCI_NTO_SEND));
// Possible oracle bug for OCI_ATTR_RECEIVE_TIMEOUT
// ASSERT_EQ(2000, OCI_GetTimeout(conn, OCI_NTO_RECEIVE));
ASSERT_EQ(3000, OCI_GetTimeout(conn, OCI_NTO_CALL));


ASSERT_TRUE(OCI_ConnectionFree(conn));
ASSERT_TRUE(OCI_Cleanup());
}

INSTANTIATE_TEST_CASE_P(ReportedIssuesCApi, ReportedIssues247, ::testing::ValuesIn(TimestampTypes));

0 comments on commit 3ce8acc

Please sign in to comment.