Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One failed query can prevent future queries working #517

Closed
seanhinde opened this issue May 4, 2018 · 6 comments
Closed

One failed query can prevent future queries working #517

seanhinde opened this issue May 4, 2018 · 6 comments
Assignees
Labels
ERLOCI Related to ERLOCI (Oracle) driver question

Comments

@seanhinde
Copy link
Member

In the lab Oracle right click and "Browse Data" on the table SCOTT.NUMBER_LONG. The erlang console shows the error message:

(dderl1@127.0.0.1)1> {oci_logger,108} TCP closed
{oci_logger,137} Terminating normal
16:23:48.389 [error] [_DDRL_] {c_src/erloci_lib/ocistmt.cpp:execute:707} Unsupported column type 8
16:23:48.389 [info] [_DDRL_] {dderloci,358} RowIdError {error,{0,<<"[execute:706] unsupporetd type 8\n">>}}
16:23:48.404 [error] [_DDRL_] {dderloci,59} run_query(select * from SCOTT.NUMBER_LONG,undefined,select SCOTT.NUMBER_LONG.*, SCOTT.NUMBER_LONG.ROWID from SCOTT.NUMBER_LONG)
{normal,{gen_server,call,[<0.834.0>,{port_call,[8,140339042098512,140339045211840]},infinity]}}
16:23:48.404 [error] [_DDRL_] {oci_adapter,693} query error {error,normal}

Further attempts to view previously working tables result in noproc errors e.g.

(dderl1@127.0.0.1)1> 16:24:16.924 [error] [_DDRL_] {dderloci,59} run_query(select * from SCOTT.TEST_TYPES,undefined,select SCOTT.TEST_TYPES.*, SCOTT.TEST_TYPES.ROWID from SCOTT.TEST_TYPES)
{noproc,{gen_server,call,[<0.834.0>,{port_call,[4,140339042098512,<<"select SCOTT.TEST_TYPES.*, SCOTT.TEST_TYPES.ROWID from SCOTT.TEST_TYPES">>]},infinity]}}
16:24:16.924 [error] [_DDRL_] {oci_adapter,693} query error {error,noproc}

Logging out and back in gets things back to a working state.

@c-bik
Copy link
Member

c-bik commented May 4, 2018

I was under the impression that DDErl can gracefully handle all query errors (without loosing the Oracle conection session). @acautin can you please investigate why isn't that the case here?

@c-bik c-bik added the question label May 4, 2018
@acautin
Copy link
Contributor

acautin commented May 6, 2018

@c-bik from:

{oci_logger,108} TCP closed
{oci_logger,137} Terminating normal
16:23:48.389 [error] [_DDRL_] {c_src/erloci_lib/ocistmt.cpp:execute:707} Unsupported column type 8
16:23:48.389 [info] [_DDRL_] {dderloci,358} RowIdError {error,{0,<<"[execute:706] unsupporetd type 8\n">>}}

Doesn't this means the connection was terminated on the driver side ?

@c-bik
Copy link
Member

c-bik commented May 6, 2018

@acautin
Yes if...

{oci_logger,108} TCP closed
{oci_logger,137} Terminating normal

...and...

[error] [_DDRL_] {c_src/erloci_lib/ocistmt.cpp:execute:707} Unsupported column type 8
[info] [_DDRL_] {dderloci,358} RowIdError {error,{0,<<"[execute:706] unsupporetd type 8\n">>}}

...are related and for same cause...
However c_src/erloci_lib/ocistmt.cpp:execute:707} +/- few lines

            default:
				r.fn_ret = FAILURE;
				SPRINT(r.gerrbuf, sizeof(r.gerrbuf), "[%s:%d] unsupporetd type %u\n", __FUNCTION__, __LINE__, cur_clm.dtype);
				REMOTE_LOG(ERR, "Unsupported column type %d\n", cur_clm.dtype);
				throw r;
                break;

is no different from any other SQL execute error including table doesn't exist (in which case I assume DDErl doesn't, and it shouldn't, loose the session).

@acautin
Copy link
Contributor

acautin commented May 6, 2018

dderl doesn't, isn't the driver the one that is closing the connection ?, that was my question as AFAIK we don't try to understand the errors just forward them to the client.

@c-bik
Copy link
Member

c-bik commented May 6, 2018

if that is the case than, specifically,

select SCOTT.NUMBER_LONG.*, SCOTT.NUMBER_LONG.ROWID from SCOTT.NUMBER_LONG

is causing the connection close!

@seanhinde can you please try the following two queries from erloci level (without DDErl) and post the console logs here?

select * from SCOTT.TABLE_DOESNT_EXIST

and

select SCOTT.NUMBER_LONG.*, SCOTT.NUMBER_LONG.ROWID from SCOTT.NUMBER_LONG

@c-bik c-bik added ERLOCI Related to ERLOCI (Oracle) driver and removed ERLOCI Related to ERLOCI (Oracle) driver labels Aug 28, 2018
@acautin
Copy link
Contributor

acautin commented Oct 15, 2018

reported to erloci K2InformaticsGmbH/erloci#71

@acautin acautin closed this as completed Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ERLOCI Related to ERLOCI (Oracle) driver question
Projects
None yet
Development

No branches or pull requests

3 participants