mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-27295 Backport SQL service, introduced by MDEV-19275.
necessary functions added to the SQL SERVICE.
This commit is contained in:
parent
b080cff3aa
commit
910a0ddd2d
7 changed files with 67 additions and 1 deletions
|
@ -435,6 +435,15 @@ extern struct sql_service_st {
|
|||
void (STDCALL *mysql_free_result_func)(MYSQL_RES *result);
|
||||
MYSQL_ROW (STDCALL *mysql_fetch_row_func)(MYSQL_RES *result);
|
||||
void (STDCALL *mysql_close_func)(MYSQL *mysql);
|
||||
int (STDCALL *mysql_options_func)(MYSQL *mysql, enum mysql_option option,
|
||||
const void *arg);
|
||||
unsigned long *(STDCALL *mysql_fetch_lengths_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
|
||||
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
|
||||
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
|
||||
const char *cert, const char *ca,
|
||||
const char *capath, const char *cipher);
|
||||
} *sql_service;
|
||||
MYSQL *mysql_real_connect_local(MYSQL *mysql);
|
||||
struct st_mysql_xid {
|
||||
|
|
|
@ -435,6 +435,15 @@ extern struct sql_service_st {
|
|||
void (STDCALL *mysql_free_result_func)(MYSQL_RES *result);
|
||||
MYSQL_ROW (STDCALL *mysql_fetch_row_func)(MYSQL_RES *result);
|
||||
void (STDCALL *mysql_close_func)(MYSQL *mysql);
|
||||
int (STDCALL *mysql_options_func)(MYSQL *mysql, enum mysql_option option,
|
||||
const void *arg);
|
||||
unsigned long *(STDCALL *mysql_fetch_lengths_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
|
||||
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
|
||||
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
|
||||
const char *cert, const char *ca,
|
||||
const char *capath, const char *cipher);
|
||||
} *sql_service;
|
||||
MYSQL *mysql_real_connect_local(MYSQL *mysql);
|
||||
struct st_mysql_xid {
|
||||
|
|
|
@ -435,6 +435,15 @@ extern struct sql_service_st {
|
|||
void (STDCALL *mysql_free_result_func)(MYSQL_RES *result);
|
||||
MYSQL_ROW (STDCALL *mysql_fetch_row_func)(MYSQL_RES *result);
|
||||
void (STDCALL *mysql_close_func)(MYSQL *mysql);
|
||||
int (STDCALL *mysql_options_func)(MYSQL *mysql, enum mysql_option option,
|
||||
const void *arg);
|
||||
unsigned long *(STDCALL *mysql_fetch_lengths_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
|
||||
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
|
||||
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
|
||||
const char *cert, const char *ca,
|
||||
const char *capath, const char *cipher);
|
||||
} *sql_service;
|
||||
MYSQL *mysql_real_connect_local(MYSQL *mysql);
|
||||
struct st_mysql_xid {
|
||||
|
|
|
@ -435,6 +435,15 @@ extern struct sql_service_st {
|
|||
void (STDCALL *mysql_free_result_func)(MYSQL_RES *result);
|
||||
MYSQL_ROW (STDCALL *mysql_fetch_row_func)(MYSQL_RES *result);
|
||||
void (STDCALL *mysql_close_func)(MYSQL *mysql);
|
||||
int (STDCALL *mysql_options_func)(MYSQL *mysql, enum mysql_option option,
|
||||
const void *arg);
|
||||
unsigned long *(STDCALL *mysql_fetch_lengths_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
|
||||
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
|
||||
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
|
||||
const char *cert, const char *ca,
|
||||
const char *capath, const char *cipher);
|
||||
} *sql_service;
|
||||
MYSQL *mysql_real_connect_local(MYSQL *mysql);
|
||||
struct st_mysql_xid {
|
||||
|
|
|
@ -435,6 +435,15 @@ extern struct sql_service_st {
|
|||
void (STDCALL *mysql_free_result_func)(MYSQL_RES *result);
|
||||
MYSQL_ROW (STDCALL *mysql_fetch_row_func)(MYSQL_RES *result);
|
||||
void (STDCALL *mysql_close_func)(MYSQL *mysql);
|
||||
int (STDCALL *mysql_options_func)(MYSQL *mysql, enum mysql_option option,
|
||||
const void *arg);
|
||||
unsigned long *(STDCALL *mysql_fetch_lengths_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
|
||||
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
|
||||
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
|
||||
const char *cert, const char *ca,
|
||||
const char *capath, const char *cipher);
|
||||
} *sql_service;
|
||||
MYSQL *mysql_real_connect_local(MYSQL *mysql);
|
||||
struct st_mysql_xid {
|
||||
|
|
|
@ -62,6 +62,15 @@ extern struct sql_service_st {
|
|||
void (STDCALL *mysql_free_result_func)(MYSQL_RES *result);
|
||||
MYSQL_ROW (STDCALL *mysql_fetch_row_func)(MYSQL_RES *result);
|
||||
void (STDCALL *mysql_close_func)(MYSQL *mysql);
|
||||
int (STDCALL *mysql_options_func)(MYSQL *mysql, enum mysql_option option,
|
||||
const void *arg);
|
||||
unsigned long *(STDCALL *mysql_fetch_lengths_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
|
||||
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
|
||||
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
|
||||
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
|
||||
const char *cert, const char *ca,
|
||||
const char *capath, const char *cipher);
|
||||
} *sql_service;
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
|
@ -78,6 +87,12 @@ extern struct sql_service_st {
|
|||
#define mysql_free_result(R) sql_service->mysql_free_result_func(R)
|
||||
#define mysql_fetch_row(R) sql_service->mysql_fetch_row_func(R)
|
||||
#define mysql_close(M) sql_service->mysql_close_func(M)
|
||||
#define mysql_options(M,O,V) sql_service->mysql_options_func(M,O,V)
|
||||
#define mysql_fetch_lengths(R) sql_service->mysql_fetch_lengths_func(R)
|
||||
#define mysql_set_character_set(M,C) sql_service->mysql_set_character_set_func(M,C)
|
||||
#define mysql_num_fields(R) sql_service->mysql_num_fields_func(R)
|
||||
#define mysql_select_db(M,D) sql_service->mysql_select_db_func(M,D)
|
||||
#define mysql_ssl_set(M,K,C,A,P,H) sql_service->mysql_ssl_set_func(M,K,C,A,P,H)
|
||||
|
||||
#else
|
||||
|
||||
|
@ -90,7 +105,7 @@ extern struct sql_service_st {
|
|||
*/
|
||||
MYSQL *mysql_real_connect_local(MYSQL *mysql);
|
||||
|
||||
/* The rest of the function declarations mest be taken from the mysql.h */
|
||||
/* The rest of the function declarations must be taken from the mysql.h */
|
||||
|
||||
#endif /*MYSQL_DYNAMIC_PLUGIN*/
|
||||
|
||||
|
|
|
@ -236,6 +236,12 @@ struct sql_service_st sql_service_handler=
|
|||
mysql_free_result,
|
||||
mysql_fetch_row,
|
||||
mysql_close,
|
||||
mysql_options,
|
||||
mysql_fetch_lengths,
|
||||
mysql_set_character_set,
|
||||
mysql_num_fields,
|
||||
mysql_select_db,
|
||||
mysql_ssl_set
|
||||
};
|
||||
|
||||
static struct st_service_ref list_of_services[]=
|
||||
|
|
Loading…
Add table
Reference in a new issue