TeslaCN commented on issue #21902:
URL:
https://github.com/apache/shardingsphere/issues/21902#issuecomment-1308261356
There is a simple way to reproduce this issue.
```java
public static void main(String[] args) throws Exception {
try (Connection connection = getConnection()) {
try (Statement statement = connection.createStatement()) {
statement.executeUpdate("drop table if exists mysql_int");
statement.executeUpdate("create table mysql_int (val_big
bigint not null, val_int int not null, val_medium mediumint not null, val_small
smallint, val_tiny tinyint not null )");
}
try (PreparedStatement preparedStatement =
connection.prepareStatement("insert into mysql_int values (?, ?, ?, ?, ?)")) {
preparedStatement.setLong(1, -1);
preparedStatement.setInt(2, -1);
preparedStatement.setShort(3, (short) -1);
preparedStatement.setShort(4, (short) -1);
preparedStatement.setByte(5, (byte) -1);
System.out.println(preparedStatement.executeUpdate());
}
}
}
private static Connection getConnection() throws Exception {
return
DriverManager.getConnection("jdbc:mysql://127.0.0.1:13306/freedom?useSSL=false&useServerPrepStmts=true",
"root", "root");
}
```
--
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]