apache/shardingsphere · error · FirebirdProtocolException
Unknown statement info request type %d
Error message
Unknown statement info request type %d
What it means
Thrown while writing the DESCRIBE output for a Firebird prepared statement: a requested describe item is not one of the handled types (TYPE, RELATION, RELATION_ALIAS, OWNER, DESCRIBE_END, and the other listed cases). The numeric item code is included. Extended describe items beyond the implemented set cannot be answered, so the packet writer throws.
Source
Thrown at database/protocol/dialect/firebird/src/main/java/org/apache/shardingsphere/database/protocol/firebird/packet/command/query/statement/prepare/FirebirdReturnColumnPacket.java:109
FirebirdPrepareStatementReturnPacket.writeString(FirebirdSQLInfoPacketType.FIELD, column.getName(), payload);
break;
case ALIAS:
FirebirdPrepareStatementReturnPacket.writeString(FirebirdSQLInfoPacketType.ALIAS, columnAlias, payload);
break;
case RELATION:
FirebirdPrepareStatementReturnPacket.writeString(FirebirdSQLInfoPacketType.RELATION, table.getName(), payload);
break;
case RELATION_ALIAS:
FirebirdPrepareStatementReturnPacket.writeString(FirebirdSQLInfoPacketType.RELATION_ALIAS, tableAlias, payload);
break;
case OWNER:
FirebirdPrepareStatementReturnPacket.writeString(FirebirdSQLInfoPacketType.OWNER, owner, payload);
break;
case DESCRIBE_END:
FirebirdPrepareStatementReturnPacket.writeCode(FirebirdSQLInfoPacketType.DESCRIBE_END, payload);
break;
default:
throw new FirebirdProtocolException("Unknown statement info request type %d", requestedItem);
}
}
}
}
View on GitHub (pinned to e952770a21)
Solutions
- Log the requestedItem code from the message and map it to the isc_info_sql_describe_* / isc_info_sql_* constant
- Simplify the SQL or driver describe options so only supported items are requested
- Try a different Jaybird/client version whose describe requests match the implemented set
- Implement the missing describe item in FirebirdReturnColumnPacket and contribute it upstream
Defensive patterns
Strategy: try-catch
Try / catch
try {
columnPacket.write(payload);
} catch (FirebirdProtocolException ex) {
// unsupported describe item: log requestedItem code and fail this prepare with a clear error;
// retrying the same prepare will not help until the item is implemented
throw new PreparedStatementDescribeException(ex.getMessage(), ex);
} Prevention
- Test prepare/describe flows with your actual driver version before upgrading it
- Report the item code upstream — coverage of describe items grows release by release
When it happens
Trigger: Preparing SQL through the proxy with describe flags that request an item outside the switch in FirebirdReturnColumnPacket — e.g. an item like isc_info_sql_describe_variables or a newer describe extension not modeled by FirebirdSQLInfoPacketType handling here.
Common situations: Drivers that request extended column metadata (owner/alias/relation variants differ across Jaybird versions); SQL containing constructs (EXECUTE BLOCK, RETURNING) that lead clients to request extra describe items.
Related errors
- Unknown statement info request type %d
- Unknown blob information request type %d
- Unknown database information request type %d
- Unknown database information request type %d
- Unknown DSQL option type %d
AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14).
Data as JSON: /api/errors/d6a93441d0e5ac54.
Report an issue: GitHub.