diff options
author | unknown <dlenev@mysql.com> | 2005-09-01 17:01:25 +0400 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2005-09-01 17:01:25 +0400 |
commit | 84ddd543c7c10b8022e3b22d1913faa3704d59a8 (patch) | |
tree | 2ba4742d506ba1b6e095df67d530e67f6b82ae7c /mysql-test/t/grant2.test | |
parent | 3aa2467ebbf7b86448fa270b3d77e497f9e2dd11 (diff) | |
parent | 2a64e9a2e89456c412ba1d53026a92a53d28940c (diff) | |
download | mariadb-git-84ddd543c7c10b8022e3b22d1913faa3704d59a8.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg12423
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/grant2.result:
Manual merge.
mysql-test/t/grant2.test:
Manual merge.
Diffstat (limited to 'mysql-test/t/grant2.test')
-rw-r--r-- | mysql-test/t/grant2.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index e3e733a50c3..cb00c41a0ca 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -163,4 +163,47 @@ set password = password("changed"); disconnect n5; connection default; + +# Bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in +# multi-threaded environment". We should be able to execute FLUSH +# PRIVILEGES and SET PASSWORD simultaneously with other account +# management commands (such as GRANT and REVOKE) without causing +# deadlocks. To achieve this we should ensure that all account +# management commands take table and internal locks in the same order. +connect (con2root,localhost,root,,); +connect (con3root,localhost,root,,); +# Check that we can execute FLUSH PRIVILEGES and GRANT simultaneously +# This will check that locks are taken in proper order during both +# user/db-level and table/column-level privileges reloading. +connection default; +lock table mysql.user write; +connection con2root; +send flush privileges; +connection con3root; +send grant all on *.* to 'mysqltest_1'@'localhost'; +connection default; +unlock tables; +connection con2root; +reap; +connection con3root; +reap; +# Check for simultaneous SET PASSWORD and REVOKE. +connection default; +lock table mysql.user write; +connection con2root; +send set password for 'mysqltest_1'@'localhost' = password(''); +connection con3root; +send revoke all on *.* from 'mysqltest_1'@'localhost'; +connection default; +unlock tables; +connection con2root; +reap; +connection con3root; +reap; +connection default; +# Clean-up +drop user 'mysqltest_1'@'localhost'; +disconnect con2root; +disconnect con3root; + # End of 4.1 tests |