diff options
author | guilhem@mysql.com <> | 2005-01-10 13:52:32 +0100 |
---|---|---|
committer | guilhem@mysql.com <> | 2005-01-10 13:52:32 +0100 |
commit | 3439ce4ee33b2b0e9069a03b2f1894c8986ad59b (patch) | |
tree | 86fbf8fc984c99c0e470d83ae1edd73eebf2715a /sql/net_serv.cc | |
parent | 2131786204edb6fd20d409981f4f76a55f600329 (diff) | |
download | mariadb-git-3439ce4ee33b2b0e9069a03b2f1894c8986ad59b.tar.gz |
Fix for BUG#7658 "optimize crashes slave thread (1 in 1000)]":
mysql_admin_table() attempted to write to a vio which was 0. I could have fixed mysql_admin_table()
but fixing my_net_write() looked more future-proof.
Diffstat (limited to 'sql/net_serv.cc')
-rw-r--r-- | sql/net_serv.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc index e5cb4d1e815..cad1f041005 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -227,6 +227,8 @@ int my_net_write(NET *net,const char *packet,ulong len) { uchar buff[NET_HEADER_SIZE]; + if (unlikely(!net->vio)) // nowhere to write + return 0; /* Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH length. The last packet is always a packet that is < MAX_PACKET_LENGTH. |