From 99e1294c1e2ddd0bbd81129f1c0902be31a38f48 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 24 Apr 2017 15:39:47 +0200 Subject: bugfix: federated/replication did not increment bytes_received status variable because mysql->net.thd was reset to NULL in mysql_real_connect() and thd_increment_bytes_received() didn't do anything. Fix: * set mysql->net.thd to current_thd instread. * remove the test for non-null THD from a very often used function thd_increment_bytes_received(). --- sql-common/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql-common/client.c') diff --git a/sql-common/client.c b/sql-common/client.c index 86c7dea5a58..42b6667b1bf 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -3408,7 +3408,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, if (mysql->options.extension && mysql->options.extension->async_context) net->vio->async_context= mysql->options.extension->async_context; - if (my_net_init(net, net->vio, 0, MYF(0))) + if (my_net_init(net, net->vio, _current_thd(), MYF(0))) { vio_delete(net->vio); net->vio = 0; -- cgit v1.2.1