{"record":{"id":"7460099b614f7fbb","repo":"apache/shardingsphere","slug":"unknown-database-information-request-type-d","errorCode":null,"errorMessage":"Unknown database information request type %d","messagePattern":"Unknown database information request type (.+?)","errorType":"exception","errorClass":"FirebirdProtocolException","httpStatus":null,"severity":"error","filePath":"database/protocol/dialect/firebird/src/main/java/org/apache/shardingsphere/database/protocol/firebird/packet/command/query/info/type/database/FirebirdDatabaseInfoReturnPacket.java","lineNumber":101,"sourceCode":"            case ODS_VERSION:\n                data.writeInt1(FirebirdDatabaseInfoPacketType.ODS_VERSION.getCode());\n                data.writeInt2LE(4);\n                data.writeInt4LE(MAJOR_VERSION);\n                break;\n            case ODS_MINOR_VERSION:\n                data.writeInt1(FirebirdDatabaseInfoPacketType.ODS_MINOR_VERSION.getCode());\n                data.writeInt2LE(4);\n                data.writeInt4LE(MINOR_VERSION);\n                break;\n            case FIREBIRD_VERSION:\n                data.writeInt1(FirebirdDatabaseInfoPacketType.FIREBIRD_VERSION.getCode());\n                data.writeInt2LE(FB_VERSION.length() + 2);\n                data.writeInt1(1);\n                data.writeInt1(FB_VERSION.length());\n                data.writeBytes(FB_VERSION.getBytes(StandardCharsets.UTF_8));\n                break;\n            default:\n                throw new FirebirdProtocolException(\"Unknown database information request type %d\", type.getCode());\n        }\n    }\n}\n","sourceCodeStart":83,"sourceCodeEnd":105,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/database/protocol/dialect/firebird/src/main/java/org/apache/shardingsphere/database/protocol/firebird/packet/command/query/info/type/database/FirebirdDatabaseInfoReturnPacket.java#L83-L105","documentation":"Thrown when a Firebird database information request asks for an item this return-packet writer does not handle. The switch covers a small set (including ODS_MINOR_VERSION and FIREBIRD_VERSION); any other isc_info_db_* item reaches the default branch and throws with the item's numeric code.","triggerScenarios":"Issuing isc_database_info for items not in the implemented set of FirebirdDatabaseInfoReturnPacket (e.g. isc_info_page_size, isc_info_allocation, isc_info_oldest_transaction), hitting the default case in the switch.","commonSituations":"Connection setup or monitoring tools that probe page size, dialect, or transaction state; drivers whose feature detection queries several db info items in one call.","solutions":["Map the numeric code from the message to the isc_info_db_* constant to see which item the client wanted","Limit client database-info requests to the items the proxy implements (ODS versions, Firebird version string)","Implement the missing item in FirebirdDatabaseInfoReturnPacket following the writeInt1/writeInt2LE/writeInt4LE pattern and submit it upstream","Disable the client feature that issues the unsupported info request (often a connection property or metadata probe)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// whitelist the database info items you know the proxy implements before issuing isc_database_info\nSet<Integer> implemented = Set.of(\n        FirebirdDatabaseInfoPacketType.ODS_MINOR_VERSION.getCode(),\n        FirebirdDatabaseInfoPacketType.FIREBIRD_VERSION.getCode()); // extend as coverage grows\nrequestItems.retainAll(implemented);","typeGuard":null,"tryCatchPattern":"try {\n    returnPacket.write(data);\n} catch (FirebirdProtocolException ex) {\n    // item code is in the message; drop that item from the request set and retry the remaining items\n    log.warn(\"dropping unsupported db info item: {}\", ex.getMessage());\n}","preventionTips":["Request db info items individually (or in small batches) so one unsupported code does not fail the whole call","Version-check the proxy's Firebird dialect coverage before enabling metadata-hungry tools"],"tags":["firebird","protocol","database-info","unsupported-feature","switch-default"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}