Affects Version/s: 10.0.1, 5.5.28a, 5.3.11, 5.2.13, 5.1.66
Environment:Debian 6.0.6 amd64 on both machines : one running 5.5.28a-MariaDB-a1~squeeze-l and one running MySQL 5.1.66-0+squeeze1-log
Doing a SELECT query involving a subquery on information_schema will lock the query and the whole information_schema (even if the query is done by an unpriviledged user).
All queries done afterwise on the information_schema (including the use of SHOW STATUS and SHOW VARIABLES) wont end and cannot be killed (Status: Killed and State: executing) until the mysqld process is stopped and the mysqld wont shutdown gracefully (a kill -9 must be done in order to stop it).
Here is an example of these problematic queries :
SELECT VARIABLE_VALUE FROM information_schema.session_status WHERE VARIABLE_NAME = 'Uptime' + (SELECT VARIABLE_VALUE FROM information_schema.session_status WHERE VARIABLE_NAME = 'Uptime');
The query boils down to
and one can add additional conditions of one's choice or extend it to make more realistic.
Reproducible on all current trees, MariaDB 5.1-10.0 and MySQL 5.1-5.6.
Stack trace from maria/5.5 revno 3607.