summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-04-24 15:39:47 +0200
committerSergei Golubchik <serg@mariadb.org>2017-04-27 19:12:37 +0200
commit99e1294c1e2ddd0bbd81129f1c0902be31a38f48 (patch)
treea5ef2bbbef5e45d81d29eef6d3fe8ef85245f8b1 /sql-common
parent2c3f5787896f1278e240095c49539ad7baf77d8b (diff)
downloadmariadb-git-99e1294c1e2ddd0bbd81129f1c0902be31a38f48.tar.gz
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().
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c2
1 files changed, 1 insertions, 1 deletions
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;