The manual describes wait_timeout thusly: "The number of seconds the server waits for activity on a non-interactive connection before closing it. On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()). See also interactive_timeout. "
What is defined as 'activity'? For example, if the client connection issues a query which requires 6 minutes for the server to process, will it timeout with a wait_timeout of 5m, or does wait_timeout understand that the query has not yet been completed?