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; }
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 connect. cc 2012-06-10 20:27:39.000000000 +0800 stats-> total_connectio ns++; stats-> total_ssl_ connections+ +;
+++ b/sql/sql_
@@ -499,7 +499,7 @@
}
}
user_
- if (thd->net.vio->type == VIO_TYPE_SSL)
+ if (thd->net.vio != NULL && thd->net.vio->type == VIO_TYPE_SSL)
user_
return 0;
}