List:MySQL and Java« Previous MessageNext Message »
From:raffi@dcit.com Date:February 7 2003 4:05pm
Subject:max_allowed_packet stuck at 65536 in jdbc-mysql?
View as plain text  
Hi all.
We're seeing something strange here in a situation with MySQL 3.23.5x 
and the mm.mysql-2.0.4 driver. There is a large query going through 
(about 1 MB in size) which is being stopped with an sql error that says ...

Packet is larger than max_allowed_packet from server configuration of 
65536 bytes ...

We've checked and mysqld reports that the max_allowed_packet is set to 
16M ... which is coming from the my.ini file (changing it doesnt seem to 
solve the problem). The code also seems to be setting the 
max_allowed_packet variable for the jdbc driver with something like...

Properties dbprops = new Properties();
dbprops.setProperty("max_allowed_packet", "2048000");
Connection c = 
DriverManager.getConnection(url+"?user="+username+"&password="+password, 
dbprops);

yet the error still occurs claiming (as you can see) that the 
max_allowed_packet is set to 65536.

Should I check myself in for a brain scan or is it simpler than that?
I cant seem to figure out any way to verify that the driver properties 
being set are actually in effect (seems like they are not!) like I can 
with mysqld by connecting with the mysql client and typing SHOW VARIABLES;.

Any help is appreciated.

Thanks!


Thread
max_allowed_packet stuck at 65536 in jdbc-mysql?raffi@dcit.com7 Feb