MCPcopy Create free account
hub / github.com/MariaDB/server / decrease_user_connections

Function decrease_user_connections

sql/sql_connect.cc:212–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210*/
211
212void decrease_user_connections(USER_CONN *uc)
213{
214 DBUG_ENTER("decrease_user_connections");
215 mysql_mutex_lock(&LOCK_user_conn);
216 DBUG_ASSERT(uc->connections);
217 if (!--uc->connections && !mqh_used)
218 {
219 /* Last connection for user; Delete it */
220 (void) my_hash_delete(&hash_user_connections,(uchar*) uc);
221 }
222 mysql_mutex_unlock(&LOCK_user_conn);
223 DBUG_VOID_RETURN;
224}
225
226
227/*

Callers 3

cleanupMethod · 0.85
sql_parse.ccFile · 0.85
end_connectionFunction · 0.85

Calls 1

my_hash_deleteFunction · 0.85

Tested by

no test coverage detected