1#
2# MDEV-5405 RQG induced crash in mi_assign_to_key_cache in safe mutex unlock
3#
4--source include/have_debug_sync.inc
5create table t1 (f int, key(f)) engine=myisam;
6set global kc1.key_buffer_size = 65536;
7
8connect (con1, localhost, root);
9
10set debug_sync='assign_key_cache_op_unlock wait_for op_locked';
11send cache index t1 in kc1;
12
13connection default;
14sleep 1;
15set debug_sync='assign_key_cache_op_lock signal op_locked wait_for assigned';
16send cache index t1 in kc1;
17
18connection con1;
19reap;
20set debug_sync='now signal assigned';
21disconnect con1;
22connection default;
23reap;
24
25drop table t1;
26set global kc1.key_buffer_size = 0;
27set debug_sync='reset';
28