{"record":{"id":"09648c7ba58d3ee4","repo":"apache/shardingsphere","slug":"unknown-statement-info-request-type-d-09648c","errorCode":null,"errorMessage":"Unknown statement info request type %d","messagePattern":"Unknown statement info request type (.+?)","errorType":"exception","errorClass":"FirebirdProtocolException","httpStatus":null,"severity":"error","filePath":"proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/prepare/FirebirdPrepareStatementCommandExecutor.java","lineNumber":165,"sourceCode":"                case STMT_TYPE:\n                    returnPacket.setType(statementType);\n                    break;\n                case SELECT:\n                    if (statementType.isSelectDescribable()) {\n                        processDescribe(sqlStatementContext, metaDataContexts, returnPacket.getDescribeSelect(), true);\n                    } else {\n                        skipDescribe();\n                    }\n                    break;\n                case BIND:\n                    if (statementType.isBindDescribable()) {\n                        processDescribe(sqlStatementContext, metaDataContexts, returnPacket.getDescribeBind(), false);\n                    } else {\n                        skipDescribe();\n                    }\n                    break;\n                default:\n                    throw new FirebirdProtocolException(\"Unknown statement info request type %d\", packet.getCurrentItem());\n            }\n        }\n        return Collections.singleton(new FirebirdGenericResponsePacket().setData(returnPacket));\n    }\n    \n    private FirebirdSQLInfoReturnValue getFirebirdStatementType(final SQLStatement statement) {\n        if (statement instanceof SelectStatement) {\n            return FirebirdSQLInfoReturnValue.SELECT;\n        }\n        if (statement instanceof InsertStatement) {\n            if (((InsertStatement) statement).getReturning().isPresent()) {\n                returningSegment = ((InsertStatement) statement).getReturning().orElse(null);\n                return FirebirdSQLInfoReturnValue.EXEC_PROCEDURE;\n            }\n            return FirebirdSQLInfoReturnValue.INSERT;\n        }\n        if (statement instanceof UpdateStatement) {\n            if (((UpdateStatement) statement).getReturning().isPresent()) {","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/statement/prepare/FirebirdPrepareStatementCommandExecutor.java#L147-L183","documentation":"FirebirdProtocolException thrown by FirebirdPrepareStatementCommandExecutor while iterating the describe items requested in a prepare packet: an item type other than the supported describe-variants (describe output / describe bind, each optionally skipped) reaches the default branch. The proxy only knows how to describe the SELECT-list and the BIND parameters.","triggerScenarios":"The executor loops over the requested info items in the PREPARE message; the switch handles item types whose statementType is describable (e.g. DESCRIBE for output, BIND for input) and skips otherwise; packet.getCurrentItem() outside those constants throws 'Unknown statement info request type %d'.","commonSituations":"a client requesting extended statement info items (e.g. statement plan or metadata extensions) the proxy does not implement; malformed item list where a length byte is misread as an item type; client from a newer Firebird protocol asking for new describe items.","solutions":["Request only describe-output and describe-bind items in the prepare message (as Jaybird does by default).","Disable client options that ask for extended statement info (e.g. plan retrieval) when connecting through the proxy.","Check item-list encoding (item type followed by item length) if you build prepare packets manually."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (SQLException e) {\n    if (e.getMessage().contains(\"Unknown statement info request type\")) {\n        // simplify the prepare request: ask only for describe output + describe bind\n        sendPrepareMinimal(sql);\n    } else throw e;\n}","preventionTips":["Use default driver prepare options; disable extended info (plans, etc.).","Encode item lists exactly as tag + length pairs."],"tags":["firebird","prepared-statement","describe","protocol"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}