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/10/10 06:37:39 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB

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

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


[GitHub] [shardingsphere] strongduanmu closed issue #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB
URL: https://github.com/apache/shardingsphere/issues/19512


-- 
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] github-actions[bot] closed issue #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB
URL: https://github.com/apache/shardingsphere/issues/19512


-- 
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 #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB

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

   `org.apache.shardingsphere.db.protocol.mysql.codec.MySQLPacketCodecEngine` is also used by ShardingSphere Scaling. It might change a lot of codes to fix this issue.


-- 
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] github-actions[bot] commented on issue #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #19512:
URL: https://github.com/apache/shardingsphere/issues/19512#issuecomment-1272349263

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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 #19512: ShardingSphere-Proxy MySQL cannot encode packet whose length >= 16 MB

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

   Refer to https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_basic_packets.html


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