7.2 C API Asynchronous Interface Data Structures (original) (raw)

Stage of an asynchronous connection. The value may be one of the CONNECT_STAGE_ symbols shown in the following table.

Enumeration Stage Value Description
CONNECT_STAGE_INVALID = 0 MYSQL not valid or an unknown state
CONNECT_STAGE_NOT_STARTED Not connected
CONNECT_STAGE_NET_BEGIN_CONNECT Begin connection to the server
CONNECT_STAGE_NET_WAIT_CONNECT Wait for connection to be established
CONNECT_STAGE_NET_COMPLETE_CONNECT Initialize the local data structures post connect
CONNECT_STAGE_READ_GREETING Read the first packet
CONNECT_STAGE_PARSE_HANDSHAKE Parse the first packet
CONNECT_STAGE_ESTABLISH_SSL TLS establishment
CONNECT_STAGE_AUTHENTICATE Authentication phase
CONNECT_STAGE_AUTH_BEGIN Determine the plugin to use
CONNECT_STAGE_AUTH_RUN_FIRST_AUTHENTICATE_USER Run first auth plugin
CONNECT_STAGE_AUTH_HANDLE_FIRST_AUTHENTICATE_USER Handle the result of the first authentication plugin run
CONNECT_STAGE_AUTH_READ_CHANGE_USER_RESULT Read the implied changed user authentication (if any)
CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUEST Check if server asked to use a different authentication plugin
CONNECT_STAGE_AUTH_RUN_SECOND_AUTHENTICATE_USER Start the authentication process again with the plugin requested by the server
CONNECT_STAGE_AUTH_INIT_MULTI_AUTH Start multifactor authentication
CONNECT_STAGE_AUTH_FINISH_AUTH Final cleanup
CONNECT_STAGE_AUTH_HANDLE_SECOND_AUTHENTICATE_USER Now read the results of the second plugin run
CONNECT_STAGE_AUTH_DO_MULTI_PLUGIN_AUTH Invoke client plugins multi-auth authentication method
CONNECT_STAGE_AUTH_HANDLE_MULTI_AUTH_RESPONSE Handle response from client plugins authentication method
CONNECT_STAGE_PREP_SELECT_DATABASE Authenticated, set initial database if specified
CONNECT_STAGE_PREP_INIT_COMMANDS Prepare to send a sequence of init commands
CONNECT_STAGE_SEND_ONE_INIT_COMMAND Send an init command, which is called once for eachinit command until they all run (or a failure occurs)
CONNECT_STAGE_COMPLETE Connected or no asynchronous connect is in progress