PDF (US Ltr)
- 1.4Mb
PDF (A4)
- 1.4Mb
This section describes data structures specific to asynchronous C API functions. For information about general-purpose C API data structures, see Section 5.2, “C API Basic Data Structures”.
-
enum connect_stageStage 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 = 0MYSQL not valid or an unknown state CONNECT_STAGE_NOT_STARTEDNot connected CONNECT_STAGE_NET_BEGIN_CONNECTBegin connection to the server CONNECT_STAGE_NET_WAIT_CONNECTWait for connection to be established CONNECT_STAGE_NET_COMPLETE_CONNECTInitialize the local data structures post connect CONNECT_STAGE_READ_GREETINGRead the first packet CONNECT_STAGE_PARSE_HANDSHAKEParse the first packet CONNECT_STAGE_ESTABLISH_SSLTLS establishment CONNECT_STAGE_AUTHENTICATEAuthentication phase CONNECT_STAGE_AUTH_BEGINDetermine the plugin to use CONNECT_STAGE_AUTH_RUN_FIRST_AUTHENTICATE_USERRun first auth plugin CONNECT_STAGE_AUTH_HANDLE_FIRST_AUTHENTICATE_USERHandle the result of the first authentication plugin run CONNECT_STAGE_AUTH_READ_CHANGE_USER_RESULTRead the implied changed user authentication (if any) CONNECT_STAGE_AUTH_HANDLE_CHANGE_USER_REQUESTCheck if server asked to use a different authentication plugin CONNECT_STAGE_AUTH_RUN_SECOND_AUTHENTICATE_USERStart the authentication process again with the plugin requested by the server CONNECT_STAGE_AUTH_INIT_MULTI_AUTHStart multifactor authentication CONNECT_STAGE_AUTH_FINISH_AUTHFinal cleanup CONNECT_STAGE_AUTH_HANDLE_SECOND_AUTHENTICATE_USERNow read the results of the second plugin run CONNECT_STAGE_AUTH_DO_MULTI_PLUGIN_AUTHInvoke client plugins multi-auth authentication method CONNECT_STAGE_AUTH_HANDLE_MULTI_AUTH_RESPONSEHandle response from client plugins authentication method CONNECT_STAGE_PREP_SELECT_DATABASEAuthenticated, set initial database if specified CONNECT_STAGE_PREP_INIT_COMMANDSPrepare to send a sequence of initcommandsCONNECT_STAGE_SEND_ONE_INIT_COMMANDSend an initcommand, which is called once for eachinitcommand until they all run (or a failure occurs)CONNECT_STAGE_COMPLETEConnected or no asynchronous connect is in progress -
enum net_async_statusThe enumeration type used to express the return status of asynchronous C API functions. The following table shows the permitted status values.
Enumeration Status Value Description NET_ASYNC_COMPLETEAsynchronous operation is complete NET_ASYNC_NOT_READYAsynchronous operation is still in progress NET_ASYNC_ERRORAsynchronous operation terminated in error NET_ASYNC_COMPLETE_NO_MORE_RESULTSFor mysql_next_result_nonblocking(); indicates no more results availableFor more information, see Chapter 7, C API Asynchronous Interface.