Commit fdd6c111 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-7419 Function cli_safe_read not exported

Start the client API for low-level protocol access:
* unsigned long mysql_net_read_packet(MYSQL *mysql);
* unsigned long mysql_net_field_length(unsigned char **packet);
parent 5dce6aa1
...@@ -854,6 +854,12 @@ my_socket STDCALL mysql_get_socket(const MYSQL *mysql); ...@@ -854,6 +854,12 @@ my_socket STDCALL mysql_get_socket(const MYSQL *mysql);
unsigned int STDCALL mysql_get_timeout_value(const MYSQL *mysql); unsigned int STDCALL mysql_get_timeout_value(const MYSQL *mysql);
unsigned int STDCALL mysql_get_timeout_value_ms(const MYSQL *mysql); unsigned int STDCALL mysql_get_timeout_value_ms(const MYSQL *mysql);
/********************************************************************
mysql_net_ functions - low-level API to MySQL protocol
*********************************************************************/
unsigned long STDCALL mysql_net_read_packet(MYSQL *mysql);
unsigned long STDCALL mysql_net_field_length(unsigned char **packet);
/* status return codes */ /* status return codes */
#define MYSQL_NO_DATA 100 #define MYSQL_NO_DATA 100
#define MYSQL_DATA_TRUNCATED 101 #define MYSQL_DATA_TRUNCATED 101
......
...@@ -732,3 +732,5 @@ int mysql_close_cont(MYSQL *sock, int status); ...@@ -732,3 +732,5 @@ int mysql_close_cont(MYSQL *sock, int status);
my_socket mysql_get_socket(const MYSQL *mysql); my_socket mysql_get_socket(const MYSQL *mysql);
unsigned int mysql_get_timeout_value(const MYSQL *mysql); unsigned int mysql_get_timeout_value(const MYSQL *mysql);
unsigned int mysql_get_timeout_value_ms(const MYSQL *mysql); unsigned int mysql_get_timeout_value_ms(const MYSQL *mysql);
unsigned long mysql_net_read_packet(MYSQL *mysql);
unsigned long mysql_net_field_length(unsigned char **packet);
...@@ -238,6 +238,9 @@ dynamic_column_get ...@@ -238,6 +238,9 @@ dynamic_column_get
dynamic_column_prepare_decimal dynamic_column_prepare_decimal
# #
mariadb_deinitialize_ssl mariadb_deinitialize_ssl
# low-level API to MySQL protocol
mysql_net_read_packet
mysql_net_field_length
) )
SET(CLIENT_API_FUNCTIONS SET(CLIENT_API_FUNCTIONS
......
...@@ -4897,3 +4897,20 @@ my_bool STDCALL mysql_read_query_result(MYSQL *mysql) ...@@ -4897,3 +4897,20 @@ my_bool STDCALL mysql_read_query_result(MYSQL *mysql)
return (*mysql->methods->read_query_result)(mysql); return (*mysql->methods->read_query_result)(mysql);
} }
/********************************************************************
mysql_net_ functions - low-level API to MySQL protocol
*********************************************************************/
#if MYSQL_VERSION_ID > 100100
#error remove these wrappers in 10.1, rename functions instead
#endif
ulong STDCALL mysql_net_read_packet(MYSQL *mysql)
{
return cli_safe_read(mysql);
}
ulong STDCALL mysql_net_field_length(uchar **packet)
{
return net_field_length(packet);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment