Skip to content

Commit

Permalink
[Enhancement] Adjust the default value of max_allowed_packet to 32MB (S…
Browse files Browse the repository at this point in the history
…tarRocks#24003)

Fixes SR-10223
The default value is 1MB which is too small for long sql query.

Signed-off-by: Dejun Xia <[email protected]>
  • Loading branch information
nshangyiming authored and abc982627271 committed Jun 5, 2023
1 parent aae6542 commit 205d6d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,10 @@ public class SessionVariable implements Serializable, Writable, Cloneable {
private long sqlSelectLimit = DEFAULT_SELECT_LIMIT;

// this is used to make c3p0 library happy
// Max packet length to send to or receive from the server,
// try to set it to a higher value if `PacketTooBigException` is thrown at client
@VariableMgr.VarAttr(name = MAX_ALLOWED_PACKET)
private int maxAllowedPacket = 1048576;
private int maxAllowedPacket = 33554432; // 32MB
@VariableMgr.VarAttr(name = AUTO_INCREMENT_INCREMENT)
private int autoIncrementIncrement = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public void testSysVariable() throws Exception {
" | <slot 9> : '/starrocks/share/english/'\n" +
" | <slot 10> : 'Apache License 2.0'\n" +
" | <slot 11> : 0\n" +
" | <slot 12> : 1048576\n" +
" | <slot 12> : 33554432\n" +
" | <slot 13> : 16384\n" +
" | <slot 14> : 60\n" +
" | <slot 15> : 1048576\n" +
Expand Down

0 comments on commit 205d6d5

Please sign in to comment.