nakagami / Firebird.jl

A Julia interface to the Firebird RDBMS
MIT License
7 stars 0 forks source link

Exception with complex SQL thta works fine in Flamerobin #5

Open Roeya opened 7 months ago

Roeya commented 7 months ago

I have an exception at wireprotocol.jl line 864: `

if op_code != op_fetch_response

    if op_code == op_response

        parse_op_response(wp)

    end

    throw(DomainError("op_fetch_resonse:op_code=$(op_code)"))

end

` The op_code is 9, op_fetch_response is 66 op_response is 9

Cannot understand from where op_fetch_response & op_response gets the value (global variables ?)

The database is very big and contain confidential data The query has many left and inner join the specific column causing the exception looks like this: CASE WHEN WI.STEP_ID = -1 THEN WI.ENTRY_DATE ELSE NULL END AS REJECTED_TS,

Hope this helps to understand the problem,

nakagami commented 7 months ago

The op_fetch_response and op_response here are defined in consts.jl.

In the go driver https://github.com/nakagami/firebirdsql/blob/master/wireprotocol.go#L1062 This is the equivalent process.

The error is not easy to understand, though, I think the select statement immediately preceding it may not be good. (or a driver defect).