You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/27 09:10:25 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #23122: MySQL Proxy E2E test scenario passthrough failed when using mysql-connector-java 8.0.31

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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz closed issue #23122: MySQL Proxy E2E test scenario passthrough failed when using mysql-connector-java 8.0.31

Posted by GitBox <gi...@apache.org>.
sandynz closed issue #23122: MySQL Proxy E2E test scenario passthrough failed when using mysql-connector-java 8.0.31
URL: https://github.com/apache/shardingsphere/issues/23122


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23122: MySQL Proxy E2E test scenario passthrough failed when using mysql-connector-java 8.0.31

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23122:
URL: https://github.com/apache/shardingsphere/issues/23122#issuecomment-1367177700

   Relates to #21902.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23122: MySQL Proxy E2E test scenario passthrough failed when using mysql-connector-java 8.0.31

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23122:
URL: https://github.com/apache/shardingsphere/issues/23122#issuecomment-1367074565

   I found that if we connect ShardingSphere-Proxy by MySQL JDBC 5.1.47:
   ```
   preparedStatement.setByte(5, (byte) -128); // Out of range value for column 'col_tinyint' at row 1
   preparedStatement.setObject(5, (byte) -128); // This worked
   ```
   
   But if we connect ShardingSphere-Proxy by MySQL JDBC 8.0.x:
   Both of them didn't worked.
   ```
   preparedStatement.setByte(5, (byte) -128); // Out of range value for column 'col_tinyint' at row 1
   preparedStatement.setObject(5, (byte) -128); // Out of range value for column 'col_tinyint' at row 1
   ```
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23122: MySQL Proxy E2E test scenario passthrough failed when using mysql-connector-java 8.0.31

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23122:
URL: https://github.com/apache/shardingsphere/issues/23122#issuecomment-1375309990

   Since the MySQL Connector/J 8.0.31 has changed groupId, I'm using 8.0.30.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org