MySQL 5.6.14 Source Code Document
|
Go to the source code of this file.
Classes | |
struct | st_plugin_vio_info |
struct | st_plugin_vio |
Macros | |
#define | MYSQL_PLUGIN_AUTH_COMMON_INCLUDED |
#define | MYSQL_USERNAME_LENGTH 48 |
#define | CR_AUTH_PLUGIN_ERROR 3 |
#define | CR_AUTH_HANDSHAKE 2 |
#define | CR_AUTH_USER_CREDENTIALS 1 |
#define | CR_ERROR 0 |
#define | CR_OK -1 |
#define | CR_OK_HANDSHAKE_COMPLETE -2 |
Typedefs | |
typedef struct st_plugin_vio_info | MYSQL_PLUGIN_VIO_INFO |
typedef struct st_plugin_vio | MYSQL_PLUGIN_VIO |
This file defines constants and data structures that are the same for both client- and server-side authentication plugins.
Definition in file plugin_auth_common.h.
#define CR_AUTH_HANDSHAKE 2 |
Authentication failed, client server handshake. An error occurred during the client server handshake. These errors are reported in table performance_schema.host_cache, column COUNT_HANDSHAKE_ERRORS.
Definition at line 45 of file plugin_auth_common.h.
#define CR_AUTH_PLUGIN_ERROR 3 |
return values of the plugin authenticate_user() method. Authentication failed, plugin internal error. An error occurred in the authentication plugin itself. These errors are reported in table performance_schema.host_cache, column COUNT_AUTH_PLUGIN_ERRORS.
Definition at line 38 of file plugin_auth_common.h.
#define CR_AUTH_USER_CREDENTIALS 1 |
Authentication failed, user credentials. For example, wrong passwords. These errors are reported in table performance_schema.host_cache, column COUNT_AUTHENTICATION_ERRORS.
Definition at line 52 of file plugin_auth_common.h.
#define CR_ERROR 0 |
Authentication failed. Additionally, all other CR_xxx values (libmysql error code) can be used too.
The client plugin may set the error code and the error message directly in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error code was returned, an error message in the MYSQL structure will be overwritten. If CR_ERROR is returned without setting the error in MYSQL, CR_UNKNOWN_ERROR will be user.
Definition at line 63 of file plugin_auth_common.h.
#define CR_OK -1 |
Authentication (client part) was successful. It does not mean that the authentication as a whole was successful, usually it only means that the client was able to send the user name and the password to the server. If CR_OK is returned, the libmysql reads the next packet expecting it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
Definition at line 71 of file plugin_auth_common.h.
#define CR_OK_HANDSHAKE_COMPLETE -2 |
Authentication was successful. It means that the client has done its part successfully and also that a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN). In this case, libmysql will not read a packet from the server, but it will use the data at mysql->net.read_pos.
A plugin may return this value if the number of roundtrips in the authentication protocol is not known in advance, and the client plugin needs to read one packet more to determine if the authentication is finished or not.
Definition at line 84 of file plugin_auth_common.h.
#define MYSQL_USERNAME_LENGTH 48 |
the max allowed length for a user name
Definition at line 26 of file plugin_auth_common.h.
typedef struct st_plugin_vio MYSQL_PLUGIN_VIO |
Provides plugin access to communication channel