summaryrefslogtreecommitdiff
path: root/sql/sql_connect.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_connect.h')
-rw-r--r--sql/sql_connect.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_connect.h b/sql/sql_connect.h
index 152bd71afd7..1a84cb56e5c 100644
--- a/sql/sql_connect.h
+++ b/sql/sql_connect.h
@@ -44,11 +44,20 @@ public:
/* Own variables */
ulonglong prior_thr_create_utime;
+ static Atomic_counter<uint32_t> count;
+
CONNECT(MYSQL_SOCKET sock_arg, enum enum_vio_type vio_type_arg,
scheduler_functions *scheduler_arg): sock(sock_arg),
vio_type(vio_type_arg), scheduler(scheduler_arg), thread_id(0),
- prior_thr_create_utime(0) {}
- ~CONNECT() { DBUG_ASSERT(vio_type == VIO_CLOSED); }
+ prior_thr_create_utime(0)
+ {
+ count++;
+ }
+ ~CONNECT()
+ {
+ count--;
+ DBUG_ASSERT(vio_type == VIO_CLOSED);
+ }
void close_and_delete();
void close_with_error(uint sql_errno,
const char *message, uint close_error);