Issue Details (XML | Word | Printable)

Key: CORE-2349
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

False "Invalid SQLDA" error

Created: 03/Mar/09 06:50 AM   Updated: 06/May/14 02:05 PM
Component/s: Engine
Affects Version/s: 2.1.0, 2.5 Alpha 1, 2.1.1
Fix Version/s: 2.5 Beta 1, 2.1.6

Time Tracking:
Not Specified

Planning Status: Unspecified


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 03/Mar/09 07:11 AM
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


Vlad Khorsun added a comment - 06/May/14 02:04 PM
Reopened to backport fix into v2.1.6