OK_Packet
You are viewing an old version of this article. View
the current version here.
OK_Packet
OK_Packet is sent by the server to client and indicates a successful completion of a command sent by client before.
Direction
server to client
Fields
- int<1> 0x00 : OK_Packet header
- int<lenenc> affected rows
- int<lenenc> last insert id
- int<2> status flags
- int<2> warning count
- if (session_tracking_supported)
- int<lenenc> info
- if (session_state_changed²)
- int<1> type
- string<lenenc> name of variable
- string<lenenc> value of variable
- int<1> type
- int<lenenc> info
Status flag
IN_TRANSACTION | 1 |
AUTOCOMMIT | 2 |
MORE_RESULTS_EXISTS | 8 |
QUERY_NO_GOOD_INDEX_USED | 16 |
QUERY_NO_INDEX_USED | 32 |
CURSOR_EXISTS | 64 |
LAST_ROW_SENT | 128 |
DB_DROPPED | 256 |
NO_BACKSLASH_ESCAPES | 512 |
METADATA_CHANGED | 1024 |
QUERY_WAS_SLOW | 2048 |
PS_OUT_PARAMETERS | 4096 |
Notes
- Session tracking is supported since MariaDB Server version 10.2. To determine if session tracking is enabled check if the flag
CLIENT_SESSION_TRACK
is set in server_capabilities. - to determine if the session_state has changed check the status for flag
SERVER_SESSION_STATE_CHANGED
.
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.