diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-01-21 10:52:39 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-01-21 10:52:39 +0100 |
commit | 43c6953fa1ba3aad4f065bfbd63cca6b5d0c5ce7 (patch) | |
tree | 7bef9c49a6902c4d29f40c0df79676254790c102 /mysql-test | |
parent | 2e11ca36f28133c18b72351d176ee2fd7fcbc465 (diff) | |
download | mariadb-git-43c6953fa1ba3aad4f065bfbd63cca6b5d0c5ce7.tar.gz |
MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling
Early evaluation of subqueries in the WHERE conditions on I_S.*_STATUS tables,
otherwise the subquery on this same table will try to acquire LOCK_status twice.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/information_schema2.result | 8 | ||||
-rw-r--r-- | mysql-test/t/information_schema2.test | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/information_schema2.result b/mysql-test/r/information_schema2.result new file mode 100644 index 00000000000..60a20944839 --- /dev/null +++ b/mysql-test/r/information_schema2.result @@ -0,0 +1,8 @@ +select variable_name from information_schema.session_status where variable_name = +(select variable_name from information_schema.session_status where variable_name = 'uptime'); +variable_name +UPTIME +select variable_name from information_schema.session_variables where variable_name = +(select variable_name from information_schema.session_variables where variable_name = 'basedir'); +variable_name +BASEDIR diff --git a/mysql-test/t/information_schema2.test b/mysql-test/t/information_schema2.test new file mode 100644 index 00000000000..c2479087f47 --- /dev/null +++ b/mysql-test/t/information_schema2.test @@ -0,0 +1,9 @@ + +# +# MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling +# +select variable_name from information_schema.session_status where variable_name = +(select variable_name from information_schema.session_status where variable_name = 'uptime'); +select variable_name from information_schema.session_variables where variable_name = +(select variable_name from information_schema.session_variables where variable_name = 'basedir'); + |