MySQL driver. More...
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/rad_assert.h>
#include <sys/stat.h>
#include "config.h"
#include "rlm_sql.h"
Go to the source code of this file.
Data Structures | |
struct | rlm_sql_mysql_config |
struct | rlm_sql_mysql_conn |
Typedefs | |
typedef struct rlm_sql_mysql_config | rlm_sql_mysql_config_t |
typedef struct rlm_sql_mysql_conn | rlm_sql_mysql_conn_t |
Enumerations | |
enum | rlm_sql_mysql_warnings { SERVER_WARNINGS_AUTO = 0, SERVER_WARNINGS_YES, SERVER_WARNINGS_NO } |
Variables | |
static const CONF_PARSER | driver_config [] |
static int | mysql_instance_count = 0 |
rlm_sql_module_t | rlm_sql_mysql |
static const FR_NAME_NUMBER | server_warnings_table [] |
static CONF_PARSER | tls_config [] |
MySQL driver.
Definition in file rlm_sql_mysql.c.
struct rlm_sql_mysql_config |
Definition at line 72 of file rlm_sql_mysql.c.
Data Fields | ||
---|---|---|
char const * | tls_ca_file | Path to the CA used to validate the server's certificate. |
char const * | tls_ca_path | Directory containing CAs that may be used to validate the servers certificate. |
char const * | tls_certificate_file | Public certificate we present to the server. |
char const * | tls_cipher | |
char const * | tls_private_key_file | Private key for the certificate we present to the server. |
rlm_sql_mysql_warnings | warnings | mysql_warning_count() doesn't appear to work with NDB cluster |
char const * | warnings_str | Whether we always query the server for additional warnings. |
struct rlm_sql_mysql_conn |
Definition at line 65 of file rlm_sql_mysql.c.
Data Fields | ||
---|---|---|
MYSQL | db | |
MYSQL_RES * | result | |
rlm_sql_row_t | row | |
MYSQL * | sock |
typedef struct rlm_sql_mysql_config rlm_sql_mysql_config_t |
typedef struct rlm_sql_mysql_conn rlm_sql_mysql_conn_t |
Enumerator | |
---|---|
SERVER_WARNINGS_AUTO | |
SERVER_WARNINGS_YES | |
SERVER_WARNINGS_NO |
Definition at line 52 of file rlm_sql_mysql.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 706 of file rlm_sql_mysql.c.
|
static |
Analyse the last error that occurred on the socket, and determine an action.
server | Socket from which to extract the server error. May be NULL. |
client_errno | Error from the client. |
Definition at line 273 of file rlm_sql_mysql.c.
|
static |
Retrieves any errors associated with the connection handle.
ctx | to allocate temporary error buffers in. |
out | Array of sql_log_entrys to fill. |
outlen | Length of out array. |
handle | rlm_sql connection handle. |
config | rlm_sql config. |
Definition at line 590 of file rlm_sql_mysql.c.
|
static |
Definition at line 713 of file rlm_sql_mysql.c.
|
static |
|
static |
Definition at line 436 of file rlm_sql_mysql.c.
|
static |
Finish query.
As a single SQL statement may return multiple results sets, (for example stored procedures) it is necessary to check whether more results exist and process them in turn if so.
Definition at line 660 of file rlm_sql_mysql.c.
|
static |
|
static |
Definition at line 496 of file rlm_sql_mysql.c.
|
static |
|
static |
Definition at line 425 of file rlm_sql_mysql.c.
|
static |
Definition at line 337 of file rlm_sql_mysql.c.
|
static |
|
static |
|
static |
Definition at line 361 of file rlm_sql_mysql.c.
|
static |
Retrieves any warnings associated with the last query.
MySQL stores a limited number of warnings associated with the last query executed. These can be very useful in diagnosing issues, or in some cases working around bugs in MySQL which causes it to return the wrong error.
ctx | to allocate temporary error buffers in. |
out | Array of sql_log_entrys to fill. |
outlen | Length of out array. |
handle | rlm_sql connection handle. |
config | rlm_sql config. |
Definition at line 525 of file rlm_sql_mysql.c.
|
static |
Definition at line 98 of file rlm_sql_mysql.c.
|
static |
Definition at line 50 of file rlm_sql_mysql.c.
rlm_sql_module_t rlm_sql_mysql |
Definition at line 731 of file rlm_sql_mysql.c.
|
static |
Definition at line 58 of file rlm_sql_mysql.c.
|
static |
Definition at line 85 of file rlm_sql_mysql.c.