Details
-
Task
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Fixed
-
1.1.7
-
None
-
None
Description
How to reproduce:
Run the attached test case maxAllowedPackedExceptionIsPrettyTest() in the attached file MaxAllowedPacketTest.java
Psedo code:
- Lower or set the server variable max_allowed_packet to a good value
- Create an SQL query bigger than max_allowed_packet
- Execute the SQL query and look at the Exception text.
Actual:
The test case will fail and this will be printed in the console:
Could not send query: Software caused connection abort: socket write error
|
Expected:
When running my test with Mysql JDBC the test case will pass and this will be printed in the log:
Packet for query is too large (1106929 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
|
Analysis:
The amount of effort to fix this is probably big. It would require that the JDBC connector to find out the session max_allowed_packet variable and count the bytes in the queries. I would prioritize this ticket low.
However if CONJ-115 is fixed in a super nice way and using the max_allowed_packet to regulate how large LOAD DATA INFILE chunks to send to the server I suspect it would be easier to write a pretty Exception message.