Skip to content

Commit d5e3d37

Browse files
committed
more C API methods in the service_sql
for columnstore
1 parent 47e29a2 commit d5e3d37

13 files changed

+86
-24
lines changed

include/mariadb_capi_rename.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,19 @@
3737
#define mysql_free_result MARIADB_ADD_PREFIX(mysql_free_result)
3838
#define mysql_get_socket MARIADB_ADD_PREFIX(mysql_get_socket)
3939
#define mysql_set_character_set MARIADB_ADD_PREFIX(mysql_set_character_set)
40+
#define mysql_real_escape_string MARIADB_ADD_PREFIX(mysql_real_escape_string)
4041
#define mysql_get_server_version MARIADB_ADD_PREFIX(mysql_get_server_version)
4142
#define mysql_error MARIADB_ADD_PREFIX(mysql_error)
4243
#define mysql_errno MARIADB_ADD_PREFIX(mysql_errno)
4344
#define mysql_num_fields MARIADB_ADD_PREFIX(mysql_num_fields)
4445
#define mysql_num_rows MARIADB_ADD_PREFIX(mysql_num_rows)
4546
#define mysql_options4 MARIADB_ADD_PREFIX(mysql_options4)
47+
#define mysql_fetch_fields MARIADB_ADD_PREFIX(mysql_fetch_fields)
4648
#define mysql_fetch_lengths MARIADB_ADD_PREFIX(mysql_fetch_lengths)
4749
#define mysql_fetch_row MARIADB_ADD_PREFIX(mysql_fetch_row)
4850
#define mysql_affected_rows MARIADB_ADD_PREFIX(mysql_affected_rows)
4951
#define mysql_store_result MARIADB_ADD_PREFIX(mysql_store_result)
52+
#define mysql_use_result MARIADB_ADD_PREFIX(mysql_use_result)
5053
#define mysql_select_db MARIADB_ADD_PREFIX(mysql_select_db)
5154
#define mysql_get_ssl_cipher MARIADB_ADD_PREFIX(mysql_get_ssl_cipher)
5255
#define mysql_ssl_set MARIADB_ADD_PREFIX(mysql_ssl_set)

include/mysql/plugin_audit.h.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@
487487
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
488488
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
489489
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
490+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
491+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
492+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
493+
const char *from, unsigned long length);
494+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
495+
const char *cert, const char *ca, const char *capath, const char *cipher);
490496
} *sql_service;
491497
MYSQL *mysql_real_connect_local(MYSQL *mysql);
492498
}

include/mysql/plugin_auth.h.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@
487487
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
488488
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
489489
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
490+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
491+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
492+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
493+
const char *from, unsigned long length);
494+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
495+
const char *cert, const char *ca, const char *capath, const char *cipher);
490496
} *sql_service;
491497
MYSQL *mysql_real_connect_local(MYSQL *mysql);
492498
}

include/mysql/plugin_data_type.h.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@
487487
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
488488
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
489489
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
490+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
491+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
492+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
493+
const char *from, unsigned long length);
494+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
495+
const char *cert, const char *ca, const char *capath, const char *cipher);
490496
} *sql_service;
491497
MYSQL *mysql_real_connect_local(MYSQL *mysql);
492498
}

include/mysql/plugin_encryption.h.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@
487487
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
488488
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
489489
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
490+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
491+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
492+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
493+
const char *from, unsigned long length);
494+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
495+
const char *cert, const char *ca, const char *capath, const char *cipher);
490496
} *sql_service;
491497
MYSQL *mysql_real_connect_local(MYSQL *mysql);
492498
}

include/mysql/plugin_ftparser.h.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@
487487
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
488488
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
489489
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
490+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
491+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
492+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
493+
const char *from, unsigned long length);
494+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
495+
const char *cert, const char *ca, const char *capath, const char *cipher);
490496
} *sql_service;
491497
MYSQL *mysql_real_connect_local(MYSQL *mysql);
492498
}

include/mysql/plugin_function.h.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@
487487
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
488488
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
489489
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
490+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
491+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
492+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
493+
const char *from, unsigned long length);
494+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
495+
const char *cert, const char *ca, const char *capath, const char *cipher);
490496
} *sql_service;
491497
MYSQL *mysql_real_connect_local(MYSQL *mysql);
492498
}

include/mysql/plugin_password_validation.h.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,12 @@
487487
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
488488
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
489489
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
490+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
491+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
492+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
493+
const char *from, unsigned long length);
494+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
495+
const char *cert, const char *ca, const char *capath, const char *cipher);
490496
} *sql_service;
491497
MYSQL *mysql_real_connect_local(MYSQL *mysql);
492498
}

include/mysql/service_sql.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ extern struct sql_service_st {
6868
int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name);
6969
unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res);
7070
int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db);
71+
MYSQL_RES *(STDCALL *mysql_use_result_func)(MYSQL *mysql);
72+
MYSQL_FIELD *(STDCALL *mysql_fetch_fields_func)(MYSQL_RES *res);
73+
unsigned long (STDCALL *mysql_real_escape_string_func)(MYSQL *mysql, char *to,
74+
const char *from, unsigned long length);
75+
my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key,
76+
const char *cert, const char *ca, const char *capath, const char *cipher);
7177
} *sql_service;
7278

7379
#ifdef MYSQL_DYNAMIC_PLUGIN
@@ -89,6 +95,10 @@ extern struct sql_service_st {
8995
#define mysql_set_character_set(M,C) sql_service->mysql_set_character_set_func(M,C)
9096
#define mysql_num_fields(R) sql_service->mysql_num_fields_func(R)
9197
#define mysql_select_db(M,D) sql_service->mysql_select_db_func(M,D)
98+
#define mysql_use_result(M) sql_service->mysql_use_result_func(M)
99+
#define mysql_fetch_fields(R) sql_service->mysql_fetch_fields_func(R)
100+
#define mysql_real_escape_string(M,T,F,L) sql_service->mysql_real_escape_string_func(M,T,F,L)
101+
#define mysql_ssl_set(M,K,C1,C2,C3,C4) sql_service->mysql_ssl_set_func(M,K,C1,C2,C3,C4)
92102

93103
#else
94104

include/service_versions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define VERSION_wsrep 0x0500
4545
#define VERSION_json 0x0100
4646
#define VERSION_thd_mdl 0x0100
47-
#define VERSION_sql_service 0x0101
47+
#define VERSION_sql_service 0x0102
4848

4949
#define VERSION_provider_bzip2 0x0100
5050
#define VERSION_provider_lz4 0x0100

0 commit comments

Comments
 (0)