summaryrefslogtreecommitdiff
path: root/mysql-test/suite/roles
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-10-23 09:49:47 -0700
committerSergei Golubchik <sergii@pisem.net>2013-10-23 09:49:47 -0700
commit7761a278f682d852fc1f7b8cc109cf42ab5c710f (patch)
tree501f648aff51c1dcd5373730b528c0d76057e681 /mysql-test/suite/roles
parentf6b8f6d156ca0e9f186ddfb600e87a90e08fa309 (diff)
downloadmariadb-git-7761a278f682d852fc1f7b8cc109cf42ab5c710f.tar.gz
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
Diffstat (limited to 'mysql-test/suite/roles')
-rw-r--r--mysql-test/suite/roles/acl_load_mutex-5170.result8
-rw-r--r--mysql-test/suite/roles/acl_load_mutex-5170.test24
2 files changed, 32 insertions, 0 deletions
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;
+