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/05/24 05:40:00 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #17891: Error occurred in ShardingSphere-Proxy MySQL if packet length exceeded 0x7FFFFF bytes

TeslaCN opened a new issue, #17891:
URL: https://github.com/apache/shardingsphere/issues/17891

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master - 0162b7ef9fd740f2d371336c487ac471aea20a91
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy MySQL
   
   ### Expected behavior
   
   Operations worked.
   
   ### Actual behavior
   
   Client logs:
   ```
   Exception in thread "main" java.sql.SQLException: Runtime exception: [Sequence ID of MySQL command packet must be `0`.]
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
   	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
   	at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763)
   	at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)
   	at icu.wwj.hello.world.jdbc.MySQLLargePacket.main(MySQLLargePacket.java:21)
   ```
   
   ShardingSphere-Proxy logs:
   ```
   [ERROR] 2022-05-24 13:38:54.638 [ShardingSphere-Command-0] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.lang.IllegalArgumentException: Sequence ID of MySQL command packet must be `0`.
   	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
   	at org.apache.shardingsphere.db.protocol.mysql.packet.command.MySQLCommandPacketTypeLoader.getCommandPacketType(MySQLCommandPacketTypeLoader.java:38)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.getCommandPacketType(MySQLCommandExecuteEngine.java:52)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.getCommandPacketType(MySQLCommandExecuteEngine.java:48)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:103)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   	at java.base/java.lang.Thread.run(Thread.java:833)
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   
   Rules of ShardingSphere doesn't matter.
   
   ```java
   try (Connection connection = DriverManager.getConnection("jdbc:mysql://127.0.0.1:13306/bmsql", "root", "root")) {
       try (Statement statement = connection.createStatement()) {
           statement.execute("drop table if exists foo");
           statement.execute("create table foo (id bigint primary key, str0 longtext)");
           long id = ThreadLocalRandom.current().nextLong();
           String str0 = RandomStringUtils.randomAlphanumeric(1 << 23);
           String sql = "insert into foo (id, str0) values (" + id + ", '" + str0 + "')";
           statement.execute(sql);
       }
   }
   ```


-- 
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] RaigorJiang closed issue #17891: Error occurred in ShardingSphere-Proxy MySQL if packet length exceeded 0x7FFFFF bytes

Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #17891: Error occurred in ShardingSphere-Proxy MySQL if packet length exceeded 0x7FFFFF bytes
URL: https://github.com/apache/shardingsphere/issues/17891


-- 
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