summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-10-25 19:12:29 +0300
committerunknown <heikki@hundin.mysql.fi>2003-10-25 19:12:29 +0300
commitf081a5413068a1491a25b60e0cee5a6619fbfa1e (patch)
treef6c35f89d6de3ab67a0ccc40d0f37f59975e6f52
parenta837775acb7eba52521d03cdbaf948f55668856f (diff)
downloadmariadb-git-f081a5413068a1491a25b60e0cee5a6619fbfa1e.tar.gz
sql_parse.cc:
Add diagnostic printf to chack that number of connections for a user never drops below zero sql/sql_parse.cc: Add diagnostic printf to chack that number of connections for a user never drops below zero
-rw-r--r--sql/sql_parse.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index d9837291f73..99f22993393 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -452,6 +452,9 @@ static void decrease_user_connections(USER_CONN *uc)
(void) pthread_mutex_lock(&LOCK_user_conn);
+ if (uc->connections == 0)
+ printf("Error: trying to decrease user %s connections below zero!\n",
+ uc->user);
if ((uc->connections && !--uc->connections) && !mqh_used)
{
/* Last connection for user; Delete it */