TeslaCN opened a new issue, #23122:
URL: https://github.com/apache/shardingsphere/issues/23122
## Bug Report
### Which version of ShardingSphere did you use?
master - e18f1107e353b9709db2ae30cdd13463c86e651d
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy with mysql-connector-java-5.1.47.jar
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
Using 5.1.47 as client, tests passed.
```bash
./mvnw -nsu -B install -f test/e2e/suite/pom.xml -Dspotless.apply.skip=true
-Dit.run.modes=Cluster -Dit.scenarios=passthrough -Dit.cluster.adapters=proxy
-Dit.cluster.databases=MySQL -Dit.cluster.env.type=DOCKER
-Dmysql-connector-java.version=5.1.47 -l /tmp/passthrough_5147.log
```
Using 8.0.31 as client, tests failed.
```bash
./mvnw -nsu -B install -f test/e2e/suite/pom.xml -Dspotless.apply.skip=true
-Dit.run.modes=Cluster -Dit.scenarios=passthrough -Dit.cluster.adapters=proxy
-Dit.cluster.databases=MySQL -Dit.cluster.env.type=DOCKER
-Dmysql-connector-java.version=8.0.31 -l /tmp/passthrough_8031.log
```
### Expected behavior
E2E tests passed.
### Actual behavior
```
[ERROR] Tests run: 23, Failures: 0, Errors: 5, Skipped: 0, Time elapsed:
38.175 s <<< FAILURE! - in JUnit Vintage
[ERROR] assertExecuteBatch[proxy: passthrough -> MySQL -> INSERT INTO
t_data_type_integer {id, col_bigint, col_int, col_mediumint, col_smallint,
col_tinyint} values {?, ?, ?, ?, ?, ?}] Time elapsed: 0.073 s <<< ERROR!
java.sql.BatchUpdateException: Data truncation: Data truncation: Out of
range value for column 'col_tinyint' at row 1
at
org.apache.shardingsphere.test.e2e.engine.dml.BatchDMLE2EIT.executeBatchForPreparedStatement(BatchDMLE2EIT.java:73)
at
org.apache.shardingsphere.test.e2e.engine.dml.BatchDMLE2EIT.assertExecuteBatch(BatchDMLE2EIT.java:63)
Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data
truncation: Data truncation: Out of range value for column 'col_tinyint' at row
1
at
org.apache.shardingsphere.test.e2e.engine.dml.BatchDMLE2EIT.executeBatchForPreparedStatement(BatchDMLE2EIT.java:73)
at
org.apache.shardingsphere.test.e2e.engine.dml.BatchDMLE2EIT.assertExecuteBatch(BatchDMLE2EIT.java:63)
[ERROR] assertExecuteUpdate[proxy: passthrough -> MySQL -> Placeholder ->
INSERT INTO t_data_type_integer {id, col_bigint, col_int, col_mediumint,
col_smallint, col_tinyint} values {?, ?, ?, ?, ?, ?}] Time elapsed: 0.011 s
<<< ERROR!
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data
truncation: Out of range value for column 'col_tinyint' at row 1
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.executeUpdateForPreparedStatement(GeneralDMLE2EIT.java:77)
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.assertExecuteUpdate(GeneralDMLE2EIT.java:61)
[ERROR] assertExecute[proxy: passthrough -> MySQL -> Placeholder -> INSERT
INTO t_data_type_integer {id, col_bigint, col_int, col_mediumint, col_smallint,
col_tinyint} values {?, ?, ?, ?, ?, ?}] Time elapsed: 0.016 s <<< ERROR!
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data
truncation: Out of range value for column 'col_tinyint' at row 1
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.executeForPreparedStatement(GeneralDMLE2EIT.java:108)
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.assertExecute(GeneralDMLE2EIT.java:91)
[ERROR] assertExecuteUpdate[proxy: passthrough -> MySQL -> Placeholder ->
INSERT INTO t_data_type_integer {id, col_bigint, col_int, col_mediumint,
col_smallint, col_tinyint} values {?, ?, ?, ?, ?, ?}] Time elapsed: 0.019 s
<<< ERROR!
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data
truncation: Out of range value for column 'col_tinyint' at row 1
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.executeUpdateForPreparedStatement(GeneralDMLE2EIT.java:77)
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.assertExecuteUpdate(GeneralDMLE2EIT.java:61)
[ERROR] assertExecute[proxy: passthrough -> MySQL -> Placeholder -> INSERT
INTO t_data_type_integer {id, col_bigint, col_int, col_mediumint, col_smallint,
col_tinyint} values {?, ?, ?, ?, ?, ?}] Time elapsed: 0.012 s <<< ERROR!
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data
truncation: Out of range value for column 'col_tinyint' at row 1
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.executeForPreparedStatement(GeneralDMLE2EIT.java:108)
at
org.apache.shardingsphere.test.e2e.engine.dml.GeneralDMLE2EIT.assertExecute(GeneralDMLE2EIT.java:91)
```
[passthrough_8031.log](https://github.com/apache/shardingsphere/files/10307130/passthrough_8031.log)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]