ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Sapego (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-8930) ODBC: Cursors are not closed when used through Go
Date Sat, 22 Sep 2018 08:43:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-8930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624557#comment-16624557
] 

Igor Sapego edited comment on IGNITE-8930 at 9/22/18 8:42 AM:
--------------------------------------------------------------

The issue still can be reproduce using the following code:
{code}
BOOST_AUTO_TEST_CASE(TestManyCursors2)
{
    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");

    SQLRETURN ret = SQLFreeHandle(SQL_HANDLE_STMT, stmt);

    if (!SQL_SUCCEEDED(ret))
        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

    for (int32_t i = 0; i < 1000; ++i)
    {
        ret = SQLAllocHandle(SQL_HANDLE_STMT, dbc, &stmt);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        SQLCHAR req[] = "SELECT 1";

        ret = SQLExecDirect(stmt, req, SQL_NTS);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        int32_t res = 0;
        SQLLEN resLen = 0;
        ret = SQLBindCol(stmt, 1, SQL_INTEGER, &res, 0, &resLen);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        ret = SQLFetch(stmt);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        BOOST_REQUIRE_EQUAL(res, 1);

        ret = SQLFreeHandle(SQL_HANDLE_STMT, stmt);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
    }
}
{code}


was (Author: isapego):
The issue still can be reproduce using the following code:
{{code}}
BOOST_AUTO_TEST_CASE(TestManyCursors2)
{
    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;SCHEMA=cache");

    SQLRETURN ret = SQLFreeHandle(SQL_HANDLE_STMT, stmt);

    if (!SQL_SUCCEEDED(ret))
        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

    for (int32_t i = 0; i < 1000; ++i)
    {
        ret = SQLAllocHandle(SQL_HANDLE_STMT, dbc, &stmt);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        SQLCHAR req[] = "SELECT 1";

        ret = SQLExecDirect(stmt, req, SQL_NTS);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        int32_t res = 0;
        SQLLEN resLen = 0;
        ret = SQLBindCol(stmt, 1, SQL_INTEGER, &res, 0, &resLen);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        ret = SQLFetch(stmt);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));

        BOOST_REQUIRE_EQUAL(res, 1);

        ret = SQLFreeHandle(SQL_HANDLE_STMT, stmt);

        if (!SQL_SUCCEEDED(ret))
            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
    }
}
{{code}}

> ODBC: Cursors are not closed when used through Go
> -------------------------------------------------
>
>                 Key: IGNITE-8930
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8930
>             Project: Ignite
>          Issue Type: Bug
>          Components: odbc
>    Affects Versions: 2.5
>            Reporter: Igor Sapego
>            Assignee: Igor Sapego
>            Priority: Major
>              Labels: odbc
>             Fix For: 2.7
>
>
> Client used: https://github.com/alexbrainman/odbc
> Example app for reproducing: [https://github.com/nombiezinja/ignite-cursor-example]
> After several execution of statements user begins to get the following error:
> {noformat}
> 2018/06/29 20:46:06 SQLExecute: {HY000} Too many open cursors (either close
> other open cursors or increase the limit through
> ClientConnectorConfiguration.maxOpenCursorsPerConnection) [maximum=128,
> current=128]{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message