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 the client and indicates a successful completion of a command sent by the client before.

Direction

Server to client.

Fields


Server status flag

Values of server status flag

SERVER_STATUS_IN_TRANS1A transaction is currently active
SERVER_STATUS_AUTOCOMMIT2Autocommit mode is set
SERVER_MORE_RESULTS_EXISTS8more results exists (more packet follow)
SERVER_QUERY_NO_GOOD_INDEX_USED16
SERVER_QUERY_NO_INDEX_USED32
SERVER_STATUS_CURSOR_EXISTS64when using COM_STMT_FETCH, indicate that current cursor still has result
SERVER_STATUS_LAST_ROW_SENT128when using COM_STMT_FETCH, indicate that current cursor has finished to send results
SERVER_STATUS_DB_DROPPED1<<8database has been dropped
SERVER_STATUS_NO_BACKSLASH_ESCAPES1<<9current escape mode is "no backslash escape"
SERVER_STATUS_METADATA_CHANGED1<<10A DDL change did have an impact on an existing PREPARE (an automatic reprepare has been executed)
SERVER_QUERY_WAS_SLOW1<<11
SERVER_PS_OUT_PARAMS1<<12this resultset contain stored procedure output parameter
SERVER_STATUS_IN_TRANS_READONLY1<<13current transaction is a read-only transaction
SERVER_SESSION_STATE_CHANGED1<<14session state change. see Session change type for more information


Session state info


Session change type

0SESSION_TRACK_SYSTEM_VARIABLES
1SESSION_TRACK_SCHEMA
2SESSION_TRACK_STATE_CHANGE
3SESSION_TRACK_GTIDS
4SESSION_TRACK_TRANSACTION_CHARACTERISTICS
5SESSION_TRACK_TRANSACTION_STATE


session data's change

Each type of data has his own kind of format :

SESSION_TRACK_SCHEMA
SESSION_TRACK_SYSTEM_VARIABLES

while there is remaining data :

for each variable data :

SESSION_TRACK_STATE_CHANGE

indicates if session state changes occured. The value is represented as "1".

Notes

  • Session tracking is supported from MariaDB 10.2. To determine if session tracking is enabled, check if the CLIENT_SESSION_TRACK flag is set in server_capabilities.

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.