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

False "Invalid SQLDA" error [CORE2349] #2772

Closed
firebird-issue-importer opened this issue Mar 3, 2009 · 9 comments
Closed

False "Invalid SQLDA" error [CORE2349] #2772

firebird-issue-importer opened this issue Mar 3, 2009 · 9 comments

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented Mar 3, 2009

Submitted by: @hvlad

When "lazy port" feature is active (i.e. both client and server version is 2.1 or higher) "invalid SQLDA" error could be raised.
It could happen if one transport-level packet contain both op_execute and op_fetch logical packets.

Commits: 27cba7f fd2099a FirebirdSQL/fbt-repository@9bdab06

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 3, 2009

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 3, 2009

Commented by: @hvlad

The error happens in following scenario :

1. SRVR_multy_thread :
port->receive() // op_execute received
xdr_sql_blr
statement->rsr_format = statement->rsr_bind_format

2. SRVR_multy_thread :
port->receive() // op_fetch received
xdr_sql_blr
statement->rsr_format = statement->rsr_select_format

3. loopThread :
process_packet // op_execite processed
rem_port::execute_statement
in_msg_length = statement->rsr_format->fmt_length; // here statement->rsr_format == statement->rsr_select_format
DSQL_execute (... in_msg_length... )
map_in_out
parse_blr

and error raised here :
if (*blr++ != (UCHAR) blr_end || offset != msg_length)
{
ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-804) <<
Arg::Gds(isc_dsql_sqlda_err));
}

Make server to not call port->receive() if port already have packet recieved but not processed.
So, order of execution will be as follows :

1. SRVR_multy_thread :
port->receive() // op_execute received
xdr_sql_blr
statement->rsr_format = statement->rsr_bind_format

2. loopThread :
process_packet // op_execute processed

3. loopThread :
port->receive() // op_fetch received
xdr_sql_blr
statement->rsr_format = statement->rsr_select_format

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 3, 2009

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Nov 9, 2009

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 6, 2014

Commented by: @hvlad

Reopened to backport fix into v2.1.6

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 6, 2014

Modified by: @hvlad

status: Closed [ 6 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 6, 2014

Modified by: @hvlad

status: Reopened [ 4 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1.6 [ 10460 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 22, 2015

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jan 18, 2016

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment