{"record":{"id":"42aaefd71a0723ad","repo":"prestodb/presto","slug":"multiple-open-results-not-supported","errorCode":null,"errorMessage":"Multiple open results not supported","messagePattern":"Multiple open results not supported","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java","lineNumber":468,"sourceCode":"    @Override\n    public boolean getMoreResults(int current)\n            throws SQLException\n    {\n        checkOpen();\n\n        currentUpdateCount.set(-1);\n        currentUpdateType.set(null);\n\n        if (current == CLOSE_CURRENT_RESULT) {\n            closeResultSet();\n            return false;\n        }\n\n        if (current != KEEP_CURRENT_RESULT && current != CLOSE_ALL_RESULTS) {\n            throw new SQLException(\"Invalid argument: \" + current);\n        }\n\n        throw new SQLFeatureNotSupportedException(\"Multiple open results not supported\");\n    }\n\n    @Override\n    public ResultSet getGeneratedKeys()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"getGeneratedKeys\");\n    }\n\n    @Override\n    public int executeUpdate(String sql)\n            throws SQLException\n    {\n        return Ints.saturatedCast(executeLargeUpdate(sql));\n    }\n\n    @Override\n    public int executeUpdate(String sql, int autoGeneratedKeys)","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java#L450-L486","documentation":"After handling CLOSE_CURRENT_RESULT, getMoreResults(int) throws SQLFeatureNotSupportedException for KEEP_CURRENT_RESULT/CLOSE_ALL_RESULTS: the Presto driver cannot maintain multiple concurrently open results from one statement, so multi-result access is unsupported.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java:468 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Structure code to consume a single result set per statement","Use CLOSE_CURRENT_RESULT (the no-arg getMoreResults()) semantics only","Catch SQLFeatureNotSupportedException when probing multi-result support"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}