### CI Link

https://gradle-enterprise.elastic.co/s/vgdjkeiiridsk/tests/:x-pack:plugin:sql:qa:mixed-node:v8.2.0%23mixedClusterTest/org.elasticsearch.xpack.sql.qa.mixed_node.SqlCompatIT/testCursorFromOldNodeFailsOnNewNode?top-execution=1

### Repro line

./gradlew ':x-pack:plugin:sql:qa:mixed-node:v8.2.0#mixedClusterTest' -Dtests.class="org.elasticsearch.xpack.sql.qa.mixed_node.SqlCompatIT" -Dtests.method="testCursorFromOldNodeFailsOnNewNode" -Dtests.seed=FDCF684F324DE11D -Dtests.bwc=true -Dtests.locale=es-PR -Dtests.timezone=Asia/Baku -Druntime.java=17

### Does it reproduce?

Yes

### Applicable branches

master

### Failure history

_No response_

### Failure excerpt

```
java.lang.AssertionError:
  Expected: a string containing "Unsupported cursor version [8.2.0], expected [8.3.0]" |  
  but: was "method [POST], host [http://127.0.0.1:34941], URI [_sql], status line [HTTP/1.1 500 Internal Server Error] |  
  {"error":{"root_cause":[{"type":"sql_illegal_argument_exception","reason":"Unsupported cursor version [1.66.82], expected [8.3.0]"}],"type":"sql_illegal_argument_exception","reason":"Unsupported cursor version [1.66.82], expected [8.3.0]"},"status":500}"
```

x-pack/plugin/sql/qa/mixed-node/src/test/java/org/elasticsearch/xpack/sql/qa/mixed_node/SqlCompatIT.java
json.endObject();
        return Strings.toString(json);
    }
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/85520")
    public void testCursorFromOldNodeFailsOnNewNode() throws IOException {
        assertCursorNotCompatibleAcrossVersions(bwcVersion, oldNodesClient, Version.CURRENT, newNodesClient);
    }
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/83726")
    public void testCursorFromNewNodeFailsOnOldNode() throws IOException {
        assertCursorNotCompatibleAcrossVersions(Version.CURRENT, newNodesClient, bwcVersion, oldNodesClient);
    }
    private void assertCursorNotCompatibleAcrossVersions(Version version1, RestClient client1, Version version2, RestClient client2)
        throws IOException {
        indexDocs();
        Request req = new Request("POST", "_sql");
        
        req.setJsonEntity(sqlQueryEntityWithOptionalMode("SELECT int FROM test GROUP BY 1", bwcVersion));
        Map<String, Object> json = performRequestAndReadBodyAsJson(client1, req);
        String cursor = (String) json.get("cursor");
        assertThat(cursor, Matchers.not(Matchers.emptyString()));
        Request scrollReq = new Request("POST", "_sql");
        scrollReq.setJsonEntity("{\"cursor\": \"%s\"}".formatted(cursor));
        ResponseException exception = expectThrows(ResponseException.class, () -> client2.performRequest(scrollReq));
        assertThat(
            exception.getMessage(),
            Matchers.containsString("Unsupported cursor version [" + version1 + "], expected [" + version2 + "]")
        );
    }
    private Map<String, Object> performRequestAndReadBodyAsJson(RestClient client, Request request) throws IOException {
        Response response = client.performRequest(request);