From 7761a278f682d852fc1f7b8cc109cf42ab5c710f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 23 Oct 2013 09:49:47 -0700 Subject: MDEV-5170 Assertion `(&(&acl_cache->lock)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&acl_cache->lock)->m_mutex)->thread)' fails after restarting server with a pre-created role grants lock acl_cache->lock mutex for the duration of acl_load --- mysql-test/suite/roles/acl_load_mutex-5170.result | 8 ++++++++ mysql-test/suite/roles/acl_load_mutex-5170.test | 24 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 mysql-test/suite/roles/acl_load_mutex-5170.result create mode 100644 mysql-test/suite/roles/acl_load_mutex-5170.test (limited to 'mysql-test/suite/roles') diff --git a/mysql-test/suite/roles/acl_load_mutex-5170.result b/mysql-test/suite/roles/acl_load_mutex-5170.result new file mode 100644 index 00000000000..6f6688f446e --- /dev/null +++ b/mysql-test/suite/roles/acl_load_mutex-5170.result @@ -0,0 +1,8 @@ +create user user1@localhost; +create role r1 with admin user1@localhost; +grant all on test.* to r1; +select 1; +1 +1 +drop role r1; +drop user user1@localhost; diff --git a/mysql-test/suite/roles/acl_load_mutex-5170.test b/mysql-test/suite/roles/acl_load_mutex-5170.test new file mode 100644 index 00000000000..e77d191ea16 --- /dev/null +++ b/mysql-test/suite/roles/acl_load_mutex-5170.test @@ -0,0 +1,24 @@ +--source include/not_embedded.inc +# +# MDEV-5170 Assertion `(&(&acl_cache->lock)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&acl_cache->lock)->m_mutex)->thread)' fails after restarting server with a pre-created role grants +# +create user user1@localhost; +create role r1 with admin user1@localhost; +grant all on test.* to r1; + +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +wait +EOF +--shutdown_server 60 +--source include/wait_until_disconnected.inc +--enable_reconnect +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +EOF +--source include/wait_until_connected_again.inc + +select 1; + +drop role r1; +drop user user1@localhost; + -- cgit v1.2.1