shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

sharding-proxy cannot query data when 'max.connections.size.per.query=1' for server.yaml using springboot and mybatis framework

Open geomonlin opened this issue 6 years ago • 1 comments

sharding-proxy version: dev,4.0.0-rc3

configuration: config-sharding.yaml server.yaml

Running example

geomonlin avatar Dec 12 '19 05:12 geomonlin

This issue is caused by https://github.com/apache/incubator-shardingsphere/issues/3231.

max.connections.size.per.query=1 means Proxy will use MemoryQueryResult in this full routing case.

In MemoryQueryResult.java:

return metaData.isSigned(columnIndex) ? resultSet.getInt(columnIndex) : resultSet.getLong(columnIndex);

This line will anyhow return a Long Object instead an Integer Object or a Long object. Proxy will burst an exception if the data type is inconsistent.

tuohai666 avatar Dec 12 '19 06:12 tuohai666