### 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
Request indexDocs = new Request("POST", "/test/_bulk");
        indexDocs.addParameter("refresh", "true");
        StringBuilder bulk = new StringBuilder();
        for (String doc : Arrays.asList("{\"int\":1,\"kw\":\"foo\"}", "{\"int\":2,\"kw\":\"bar\"}", "{\"kw\":\"bar\"}")) {
            bulk.append("{\"index\":{}}\n").append(doc).append("\n");
        }
        indexDocs.setJsonEntity(bulk.toString());
        client().performRequest(indexDocs);
    }
    @SuppressWarnings("unchecked")
    private List<Integer> runOrderByNullsLastQuery(RestClient queryClient) throws IOException {
        indexDocs();
        Request query = new Request("POST", "_sql");
        query.setJsonEntity(sqlQueryEntityWithOptionalMode("SELECT int FROM test GROUP BY 1 ORDER BY 1 NULLS LAST", bwcVersion));
        Map<String, Object> result = performRequestAndReadBodyAsJson(queryClient, query);
        List<List<Object>> rows = (List<List<Object>>) result.get("rows");
        return rows.stream().map(row -> (Integer) row.get(0)).collect(Collectors.toList());
    }
    public static String sqlQueryEntityWithOptionalMode(String query, Version bwcVersion) throws IOException {
        XContentBuilder json = XContentFactory.jsonBuilder().startObject();
        json.field("query", query);
        if (bwcVersion.before(Version.V_7_12_0)) {
            
            
            
            
            json.field("mode", "jdbc");
            json.field("binary_format", false);
            json.field("version", bwcVersion.toString());
        }