TIDB版本升级为7.5, java执行带json的SQL结果和升级前不一致问题

  1. <mysql-connector-java.version>5.1.38</mysql-connector-java.version>
    jdbcTemplate来自Spring-jdbc5.2.7

  2. connection = Objects.requireNonNull(jdbcTemplate.getDataSource()).getConnection();
    statement = connection.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
    Map<String, Object> item = convert.toMap(resultSet);
    if (item.get(“direction”) != null) {
    itemValue.put(“direction”, item.get(“direction”));

  3. sql:ext_json->>‘$.direction’ as direction

  4. jdbc:mysql://host:port/db?useUnicode=true&characterEncoding=UTF-8&useSSL=false&tinyInt1isBit=false&yearIsDateType=false&zeroDateTimeBehavior=CONVERT_TO_NULL