Re: PacketTooBigException with mysql-connector-java 8.0.29
Posted by: Ionel Sirbu
Date: September 16, 2022 09:46AM

Hi Filipe,

Many thanks for your reply!

Unfortunately I don't have that much time to prepare any tests right now, bit of a busy time.

Re. the character set, that's set as `utf8` at schema level & I can confirm it's being used after debugging.
And speaking of debugging, I did some digging, trying to understand what gets executed differently between the 2 versions of the library & I can say that:
- 8.0.29 processes the field in question as a stream, whereas 8.0.28 does not;
- 8.0.28 sends the byte[] as is;
- 8.0.29 escapes the bytes in ReaderValueEncoder -> readBytes() -> escapeBytesIfNeeded().
`this.serverSession.getCharsetSettings().isMultibyteCharset(this.charEncoding.getValue())` returns true in my case, which then goes on to double the byte array in size.

Beyond that, I'm clueless as to how I can tackle this still.


Options: ReplyQuote

Written By
Re: PacketTooBigException with mysql-connector-java 8.0.29
September 16, 2022 09:46AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.