diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-02-13 12:57:11 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-02-13 12:57:11 +0100 |
commit | fdd6c111c254c5044cd9b6c2f7e4d0c74f427a79 (patch) | |
tree | f85a55a2c6fe6591e32beddeb83c58066a978498 /libmysql | |
parent | 5dce6aa1fe36d315f17eb9f4a0f5be808805e94c (diff) | |
download | mariadb-git-fdd6c111c254c5044cd9b6c2f7e4d0c74f427a79.tar.gz |
MDEV-7419 Function cli_safe_read not exportedmariadb-5.5.42
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);
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/CMakeLists.txt | 3 | ||||
-rw-r--r-- | libmysql/libmysql.c | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index ca5d1ec8947..4ce4ab02e6d 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -238,6 +238,9 @@ dynamic_column_get dynamic_column_prepare_decimal # mariadb_deinitialize_ssl +# low-level API to MySQL protocol +mysql_net_read_packet +mysql_net_field_length ) SET(CLIENT_API_FUNCTIONS diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index df18d6d60da..1df5f0b6d2c 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -4897,3 +4897,20 @@ my_bool STDCALL mysql_read_query_result(MYSQL *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); +} + |