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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master - 00e8042d47305fec1bb4d15ba17f88ac22b0fe7c
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy MySQL
   
   ### Expected behavior
   
   Query worked.
   
   ### Actual behavior
   
   Client stuck.
   
   ### Reason analyze (If you can)
   
   ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB.
   
   ### Example codes for reproduce this issue (such as a github link).
   
   ```java
   import org.apache.commons.lang3.RandomStringUtils;
   
   import java.sql.Connection;
   import java.sql.DriverManager;
   import java.sql.ResultSet;
   import java.sql.Statement;
   import java.util.concurrent.ThreadLocalRandom;
   
   public class MySQLLargePacket {
       
       public static void main(String[] args) throws Exception {
           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 << 26) 
- 100);
                   String sql = "insert into foo (id, str0) values (" + id + ", 
'" + str0 + "')";
                   statement.execute(sql);
                   try (ResultSet resultSet = statement.executeQuery("select 
id, str0 from foo")) {
                       while (resultSet.next()) {
                           System.out.println("len: " + 
resultSet.getString("str0").length());
                       }
                   }
               }
           }
       }
   }
   ```
   


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

Reply via email to