Comment 5 for bug 1008278

Revision history for this message
yinfeng (yinfeng-zwx) wrote : Re: Percona Server 5.5.24 crashes on Master-Master replication when userstats are enabled on both instances

Bug #1008968, Bug #1008278 and Bug #1008609 were triggered by the same code:
thd->net.vio should be guaranteed not equal to NULL.

 I've tested these three bugs and this small patch seems really works.

--- a/sql/sql_connect.cc 2012-05-30 01:42:58.000000000 +0800
+++ b/sql/sql_connect.cc 2012-06-10 20:27:39.000000000 +0800
@@ -499,7 +499,7 @@
     }
   }
   user_stats->total_connections++;
- if (thd->net.vio->type == VIO_TYPE_SSL)
+ if (thd->net.vio != NULL && thd->net.vio->type == VIO_TYPE_SSL)
     user_stats->total_ssl_connections++;
   return 0;
 }