1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

New options MARIADB_CONNECTION_BYTES_READ/SENT

Added new options MARIADB_CONNECTION_BYTES_READ and
MARIADB_CONNECTION_BYTES_SENT which can be passed to
mariadb_get_infov() api funcion to obtain the bytes sent
or read to/from database server.
This commit is contained in:
Georg Richter
2022-01-02 14:14:39 +01:00
parent bc7bbd4752
commit 510c7e5dfe
4 changed files with 15 additions and 1 deletions

View File

@@ -4495,6 +4495,12 @@ my_bool mariadb_get_infov(MYSQL *mysql, enum mariadb_value value, void *arg, ...
else
goto error;
break;
case MARIADB_CONNECTION_BYTES_READ:
*((size_t *)arg)= mysql->net.pvio->bytes_read;
break;
case MARIADB_CONNECTION_BYTES_SENT:
*((size_t *)arg)= mysql->net.pvio->bytes_sent;
break;
default:
va_end(ap);
return(-1);