Bug Report, java.lang.ClassCastException.
Bug Report
- Bug occur when jdbcType is tinyint(1) and java type is Integer, but sharding-jdbc convert the value to boolean.
- Here is the core position. org.apache.shardingsphere.shardingjdbc.jdbc.core.resultset.EncryptResultSet.getInt(final String columnLabel)
For English only, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed GitHub issues.
- Read documentation: ShardingSphere Doc.
Please pay attention on issues you submitted, because we maybe need more details. If no response more than 7 days and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
4.0.0-RC2
Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
Expected behavior
Actual behavior
Reason analyze (If you can)
In MySql ,tinyInt(1) is same with boolean type, it probable sharding-sphere make an error value cover here.
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).
Seem 4.0.0-RC3 fixed it.
Got it. It worked after config my datasource url with 'tinyInt1isBit=false'. In addition, When 4.0.0-RC3 can be found in maven central repository?