Note
This variable is introduced since OceanBase Database V3.2.3.
Description
max_allowed_packet specifies the size of a network packet.
Attributes
| Attribute | Description |
|---|---|
| Type | INT |
| Default value | 16777216. The unit is byte.
NoteThe default value is changed from 4194304 to 16777216 since OceanBase Database V4.2.1. |
| Value range | [1024, 1073741824] |
| Applicable scope |
|
| Modifiable | Yes. It can be modified using the SET statement. |
## Considerations
- This variable can be modified in the Global scope using the
SET GLOBALstatement, but it cannot be modified in the Session scope using theSET SESSIONstatement. - The Session value is only available for viewing, and the Session value must be the same as the Global value.
- When using this variable, both the client and server need to be adjusted, and an error
ERROR 1153 (08S01) : Got a packet bigger than 'max_allowed_packet' bytesis reported when the values on both sides are inconsistent.
Examples
obclient> SET GLOBAL max_allowed_packet=4194304;