Bug #107493 Update longblob column hangs with mysqlrouter 8.0.29
Submitted: 6 Jun 2022 8:26 Modified: 16 Aug 2022 10:47
Reporter: Liang Cheng Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Router Severity:S1 (Critical)
Version:8.0.29 OS:CentOS (7.5)
Assigned to: CPU Architecture:Any
Tags: mysqlrouter 8.0.29 hang

[6 Jun 2022 8:26] Liang Cheng
Description:
The MySQL cluster includes following components
1. 3 MySQL server(8.0.29) as the group replication members, one primary and two slaves
2. mysqlrouter 8.0.29
3. mysqlshell 8.0.29

The test code is attached below.
NOTE: 
1. If change the port from 6446 (mysqlrouter) to 3308 (MySQL server), no issue
2. If install mysqlrouter/mysqlshell 8.0.28 rather 8.0.29, no issue
3. make sure the file size of is not small. The file I used is about 27M

How to repeat:
Table schema
CREATE TABLE bundle (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR (255) NOT NULL,
image LONGBLOB NOT NULL
);

Test code
Connection conn = DriverManager.getConnection("JDBC:MYSQL://ip:6446/test?useSSL=false", "root", "password");
    	PreparedStatement pStmt = conn.prepareStatement("update bundle set image = ? where id =2");
    	String filePath = args[0];
    	File file = new File(filePath);
    	FileInputStream fis = new FileInputStream(file);
    	pStmt.setObject(1, fis);
    	pStmt.executeUpdate();
    	fis.close();
	conn.close();

//The file size is about 27M.
//
[6 Jun 2022 10:42] MySQL Verification Team
Hi,

Can you try to disable server side prepared statements by adding to your DSN

useServerPrepStmts=false

and retest this

thanks
[7 Jun 2022 5:43] Liang Cheng
Adding useServerPrepStmts=false doesn't work.
[7 Jun 2022 5:48] MySQL Verification Team
Hi,
what do you mean by "don't work"
 - you cannot run the test
 - you cannot reproduce the problem
 - test behaves exactly the same

thanks
[7 Jun 2022 5:49] Liang Cheng
I meant to the say is same, when updating, the thread hang there and could not return
[7 Jun 2022 5:59] MySQL Verification Team
Hi,

Thanks, this is a different bug from what I assumed originally. Mysqlrouter is failing with big packet.
[16 Aug 2022 10:43] Jan Kneschke
Posted by developer:
 
Thanks for the report.

The described problems is the same as Bug#34426322.
[16 Aug 2022 10:47] Jan Kneschke
An existing bug report already describes this very problem as Bug#107982

Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.