{"record":{"id":"7466c9f7a0945bef","repo":"apache/shardingsphere","slug":"1295","errorCode":"1295","errorMessage":"This command is not supported in the prepared statement protocol yet","messagePattern":"This command is not supported in the prepared statement protocol yet","errorType":"exception","errorClass":"UnsupportedPreparedStatementException","httpStatus":null,"severity":"error","filePath":"proxy/frontend/dialect/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java","lineNumber":118,"sourceCode":"    private List<Object> readParameters(final MySQLServerPreparedStatement preparedStatement, final Set<Integer> longDataIndexes) throws SQLException {\n        return packet.readParameters(getParameterTypes(preparedStatement), longDataIndexes, preparedStatement.getParameterColumnTypes());\n    }\n    \n    private List<MySQLPreparedStatementParameterType> getParameterTypes(final MySQLServerPreparedStatement preparedStatement) {\n        List<MySQLPreparedStatementParameterType> parameterTypes = preparedStatement.getParameterTypes();\n        if (!parameterTypes.isEmpty()) {\n            return parameterTypes;\n        }\n        List<MySQLPreparedStatementParameterType> originalTypes = packet.getNewParameterTypes();\n        if (null != originalTypes && !originalTypes.isEmpty()) {\n            return originalTypes;\n        }\n        int expectedParamCount = preparedStatement.getSqlStatementContext().getSqlStatement().getParameterCount();\n        if (expectedParamCount <= 0) {\n            return parameterTypes;\n        }\n        if (null == packet.getNullBitmap() || !isAllParametersNull(expectedParamCount)) {\n            throw new UnsupportedPreparedStatementException();\n        }\n        List<MySQLPreparedStatementParameterType> result = new ArrayList<>(expectedParamCount);\n        for (int i = 0; i < expectedParamCount; i++) {\n            result.add(new MySQLPreparedStatementParameterType(MySQLBinaryColumnType.NULL, 0));\n        }\n        return result;\n    }\n    \n    private boolean isAllParametersNull(final int expectedParamCount) {\n        for (int i = 0; i < expectedParamCount; i++) {\n            if (!packet.getNullBitmap().isNullParameter(i)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    \n    private MySQLServerPreparedStatement updateAndGetPreparedStatement() {","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/proxy/frontend/dialect/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutor.java#L100-L136","documentation":"Error \"This command is not supported in the prepared statement protocol yet\" thrown in apache/shardingsphere.","triggerScenarios":"COM_STMT_EXECUTE carries a command or cursor operation the proxy's prepared-statement protocol does not yet support.","commonSituations":"Cursor fetch or rarely used statement options sent by drivers through the binary protocol.","solutions":["Avoid using this command inside the prepared statement protocol; use a plain text query instead.","Check ShardingSphere release notes for supported prepared-statement commands.","Execute the statement directly on the backend database if it cannot be routed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}